Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Core] Layout Padding update issue #4165

Closed
myroot opened this issue Oct 21, 2018 · 0 comments
Closed

[Core] Layout Padding update issue #4165

myroot opened this issue Oct 21, 2018 · 0 comments

Comments

@myroot
Copy link
Contributor

myroot commented Oct 21, 2018

Description

The Padding of Layout does not update until re-layouting if Layout size was not changed.

Here is the code when Padding property was updated

void IPaddingElement.OnPaddingPropertyChanged(Thickness oldValue, Thickness newValue)
{
InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
}

It only call InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); it will try to measure.
but, if size was not changed, children does not re-arranged.

Steps to Reproduce

new StackLayout
{
      HeightRequest = 200,
      Children = 
      { 
            new StackLayout
            {
                  HorizontalOptions = LayoutOptions.FillAndExpand,
                  VerticalOptions = LayoutOptions.FillAndExpand,
                  BackgroundColor = Color.Blue,
                  Children =
                  {
                        new BoxView
                        {
                              HorizontalOptions = LayoutOptions.Start,
                              Color = Color.Red,
                              HeightRequest = 100,
                              WidthRequest = 100,
                        }
                  }
            }
      }
}

Change a Padding value of Layout

Expected Behavior

inner box should be re-arranged

Actual Behavior

No change looks

Basic Information

  • Version with issue: Latest
  • Last known good version: before 3.1.0
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices: All

Screenshots

before

Reproduction Link

https://gist.github.com/myroot/8ce0fa1bb6a017456c374e78f440625b

@pauldipietro pauldipietro added this to New in Triage Oct 21, 2018
@StephaneDelcroix StephaneDelcroix moved this from New to Ready For Work in Triage Oct 22, 2018
@PureWeen PureWeen added this to Ready in v3.5.0 via automation Oct 24, 2018
@samhouts samhouts moved this from Ready to In Progress in v3.5.0 Oct 25, 2018
@samhouts samhouts removed this from Ready For Work in Triage Oct 25, 2018
v3.5.0 automation moved this from In Progress to Done Oct 29, 2018
@samhouts samhouts removed this from Done in v3.5.0 Nov 19, 2018
@samhouts samhouts added this to In Progress in v3.4.0 Nov 26, 2018
@samhouts samhouts moved this from In Progress to Done in v3.4.0 Nov 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v3.4.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants