Bug 36903 - Changing ContentView.Padding inside an auto-sized Grid row does not trigger layout
Summary: Changing ContentView.Padding inside an auto-sized Grid row does not trigger l...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-12-11 17:49 UTC by bobme981
Modified: 2017-09-07 21:23 UTC (History)
5 users (show)

Tags: ac, layout, margin, padding
Is this bug a regression?: ---
Last known good build:

Sample solution (18.44 KB, application/x-zip-compressed)
2015-12-11 17:49 UTC, bobme981
margin sample (51.42 KB, application/zip)
2017-09-07 21:23 UTC, David Ortinau [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 36903 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description bobme981 2015-12-11 17:49:31 UTC
Created attachment 14252 [details]
Sample solution

See attached sample.

ContentPage -> Grid -> ContentView -> BoxView

The ContentView (white) is in a Grid row with Height="Auto".
The BoxView (purple) has a fixed height.

You can click the "Toggle Padding" button freely to change the ContentView.Padding property, but the Grid will not update the layout of its children until you click the "Force Layout" button, which as you probably guessed calls Grid.ForceLayout(). When you do this, you can see the effect the padding change was supposed to have.
Comment 1 David Ortinau [MSFT] 2017-09-07 21:22:43 UTC
Margin change to the BoxView does force the layout change.

Padding is as described a problem. Confirmed on


Adding a revised project that includes Margin example.
Comment 2 David Ortinau [MSFT] 2017-09-07 21:23:06 UTC
Created attachment 24634 [details]
margin sample