Bug 58346 - Grid appears to have a minimum size for an Auto or Star cell, prevents regular spacing
Summary: Grid appears to have a minimum size for an Auto or Star cell, prevents regula...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.5
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-24 22:09 UTC by Nicholas Bauer
Modified: 2017-08-01 01:55 UTC (History)
3 users (show)

Tags: ac ios android uwp Grid Row sizing
Is this bug a regression?: ---
Last known good build:


Attachments
repro project (296.14 KB, application/x-zip-compressed)
2017-07-31 16:43 UTC, Jimmy [MSFT]
Details


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 58346 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:
Status:
CONFIRMED

Description Nicholas Bauer 2017-07-24 22:09:47 UTC
# Steps to reproduce
Place a Grid in a StackLayout, with a Button below. The Grid should start with a single RowDefinition (Auto or 1*). Each time the button is pressed, add a fixed small-width RowDefinition (1 or 2), followed by an Auto or 1* RowDefinition, and create a BoxView with Color = Black assigned to the first added row. Visually, this creates two large empty rows separated by a horizontal black line. 

# Expected behavior
The Grid should remain a constant height, with the auto-sized rows shrinking down to nothing, and first, last, and middle rows should have the same height.

# Actual behavior
As the button is repeatedly pressed, the Grid expands vertically, pushing the button down further on the page, appearing to keep the size of the inner rows constant, while the first and last rows are allowed to shrink some. If the Grid is contained in a control that doesn't expand, the Grid will instead overflow and cover the other controls.

# Supplemental info (logs, images, videos)
https://1drv.ms/u/s!ArNr3pG0wTLtgYDfMsQtB8Mh4LF8ba4
https://1drv.ms/i/s!ArNr3pG0wTLtgYDfM3e2XfsHJcTvdcg

# Test environment (full version information)
Microsoft Visual Studio Community 2017 
Version 15.2 (26430.16) Release
VisualStudio.15.Release/15.2.0+26430.16
Microsoft .NET Framework
Version 4.7.02528

Installed Version: Community

Visual Basic 2017
Visual C# 2017
Visual C++ 2017
Visual F# 4.1
Application Insights Tools for Visual Studio Package   8.6.00404.2
ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0   15.0.30209.0
Azure Data Lake Node   1.0
Azure Data Lake Tools for Visual Studio   2.2.5000.0
Common Azure Tools   1.9
Fabric.DiagnosticEvents   1.0
JavaScript Language Service   2.0
JavaScript Project System   2.0
JavaScript UWP Project System   2.0
KofePackagePackage Extension   1.0
Merq   1.1.17-rc (cba4571)
Microsoft Azure Hive Query Language Service   2.2.5000.0
Microsoft Azure Tools   2.9
Microsoft MI-Based Debugger   1.0
Microsoft Visual Studio VC Package   1.0
Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
NuGet Package Manager   4.2.0
SQL Server Data Tools   15.1.61702.140
ToolWindowHostedEditor   1.0
TypeScript   2.2.2.0
Visual Studio Tools for Unity   3.1.0.0
Visual Studio Tools for Universal Windows Apps   15.0.26430.06
Xamarin   4.5.0.486 (fec6f88)
Xamarin.Android SDK   7.3.1.2 (9dbc4c5)
Xamarin.iOS and Xamarin.Mac SDK   10.10.0.37 (ad35de4)
Comment 1 Jimmy [MSFT] 2017-07-31 16:43:42 UTC
Created attachment 23915 [details]
repro project

Thank you for filing this report. I created a sample project that I believe reproduces the issue you described. I am confirming this report so the team can investigate further.

When first launched, the app has a Button at the bottom and a Grid that takes up the rest of the page. Adding more rows to the Grid causes the Star rows to resize, however after a certain point the Grid starts to expand vertically instead of continuing to the resize the rows.


### Steps to Reproduce
1. Run the attached project on any platform
2. Press "Add Child" repeatedly


### Expected Results
The Grid will maintain its size and any add rows will be resized to fit.


### Actual Results
The Grid will initially maintain its size. However after adding several rows the Grid begins to expand and on iOS it overflows behind the Button while on UWP it pushes the Button beyond the page. On Android the Grid appears to no longer keep adding children after this point.


### Version Test
2.3.6.122   BAD
2.3.5-pre6  BAD
2.3.4.247   BAD