Bug 55057 - Grid height incorrect with star column definition if column contains a vertical stack layout with a label and an image.
Summary: Grid height incorrect with star column definition if column contains a vertic...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-04-12 06:35 UTC by Tristan
Modified: 2017-08-28 15:46 UTC (History)
6 users (show)

Tags: android ios grid column rowheight ac
Is this bug a regression?: No
Last known good build:

Attached project containing bug (199.29 KB, application/x-zip-compressed)
2017-04-12 06:35 UTC, Tristan
repro project (185.31 KB, application/x-zip-compressed)
2017-04-18 19:41 UTC, Jimmy [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 55057 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 Tristan 2017-04-12 06:35:03 UTC
Created attachment 21448 [details]
Attached project containing bug

A simple grid containing two columns and one row. The first column contains a vertical stack layout which contains a label and an image. 

If the first column has an absolute length, the column height is calculated correctly.
If the first column is set to star, the image will overflow to the control below the grid.

Forms 2.3.4
I have only tested Android.
Sample project attached

If the second element is a label instead of an image, the height is calculated correctly.
OnMeasure seems to calculate the correct height but doesn't get a chance to apply it correctly.
Comment 1 Tristan 2017-04-12 06:36:08 UTC
Test device is a Samsung Galaxy S5 phone
Comment 2 Jimmy [MSFT] 2017-04-18 19:41:37 UTC
Created attachment 21605 [details]
repro project

I was able to reproduce the issue with the attached project. I am attaching a further minimized version of the project and confirming this report so the team can investigate further. 

### Further Observations
I was also able to reproduce this on iOS.

As mentioned, this issue does seem to be related to the column having a '*' width. However I also noticed that the overflow did not always occur. If the last line of the Label almost reached the column's width then the image would not overflow, even when the column has a * width.

To test this, modify the Label text in the attached project to work with the device/emulator you are testing with since the column width will vary on different screens. I tested on a BLU R1 HD device and iPhone 7 simulator and took screenshots: https://gist.github.com/jimmgarrido/d04619f54b19d7a0296e1bf3b700bb0a

### Version Tests
2.3.5-pre1  BAD   BAD   BAD