Bug 53520 - Grid height calculated incorrectly if a text is wrapped inside a grid cell
Summary: Grid height calculated incorrectly if a text is wrapped inside a grid cell
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-03-20 11:45 UTC by Milan Laslop
Modified: 2017-03-21 13:17 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
screenshot from minimal example (20.54 KB, image/png)
2017-03-20 11:45 UTC, Milan Laslop
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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Milan Laslop 2017-03-20 11:45:34 UTC
Created attachment 20453 [details]
screenshot from minimal example

Can be reproduced with Xamarin Forms 2.3.3.193 or 2.3.4.214-pre5
Can be reproduced in UWP.

See screenshot in attachments: grid.png

Each grid has green background to see what its height actually is.
Example A: Incorrect, Wrapped part of the text is not added to the grid height
Example B: Correct, there was only one change: first column width changed from Auto to 100
Example C: Incorrect, first column width changed from Auto to 10 (so, there is a difference between 100 and 10)

The incorrectly calculated height of course causes:
- incorrect positions of the elements placed after the grid
- incorrect calculations of the scrolled area height (if we want to scroll the grid, we cannot scroll to the very bottom)

An interesting thing is that the 3 examples differ in the definition of first column, not the second (the wrapped text is in the second column).

Minimal example: https://github.com/milan11/xamarin_forms_grid_test

Potentially similar bug: https://bugzilla.xamarin.com/show_bug.cgi?id=21844
Comment 1 Paul DiPietro [MSFT] 2017-03-20 20:26:34 UTC
Can you please test against the nightly (https://blog.xamarin.com/try-the-latest-in-xamarin-forms-with-nightly-builds/) and confirm that this is working for you? It appears to be fixed after updating.
Comment 2 Milan Laslop 2017-03-21 07:03:41 UTC
I tried it with nightly 2.3.5.72-nightly and it works correctly (both the minimal example and our original application). Thank you.