Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Margin gets applied after Width/Height #993

Closed
grokys opened this issue May 25, 2017 · 0 comments · Fixed by #994
Closed

Margin gets applied after Width/Height #993

grokys opened this issue May 25, 2017 · 0 comments · Fixed by #994
Assignees
Labels

Comments

@grokys
Copy link
Member

grokys commented May 25, 2017

The following test fails:

        [Fact]
        public void Margin_Should_Be_Applied_Before_Width_Height()
        {
            MeasureTest target;

            var outer = new Decorator
            {
                Width = 100,
                Height = 100,
                Child = target = new MeasureTest
                {
                    Width = 80,
                    Height = 80,
                    Margin = new Thickness(10),
                }
            };

            outer.Measure(Size.Infinity);

            Assert.Equal(new Size(80, 80), target.AvailableSize);
        }

The available size should be 80,80 but gets passed as 60,60. I suspect this is the problem @kekekeks is seeing in #984.

@grokys grokys added the bug label May 25, 2017
@grokys grokys self-assigned this May 25, 2017
grokys added a commit that referenced this issue May 25, 2017
grokys added a commit that referenced this issue May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant