Bug 57971 - [Forms] Label inside ViewCell is cut off vertically when LineBreakMode is WrapWords (default)
Summary: [Forms] Label inside ViewCell is cut off vertically when LineBreakMode is Wra...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.5
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-06 09:57 UTC by Matthias
Modified: 2017-12-12 09:57 UTC (History)
2 users (show)

Tags: ac ios uwp android grid label LineBreakMode
Is this bug a regression?: ---
Last known good build:


Attachments
sample solution (324.21 KB, application/x-zip-compressed)
2017-07-06 09:57 UTC, Matthias
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 Matthias 2017-07-06 09:57:50 UTC
Created attachment 23328 [details]
sample solution

We have a pretty complex layout for our ViewCells, consisting of Grids and StackLayouts inside ContentViews. The whole thing looks as follows:


+-+-----------------------+---+---+---+-+
| |      <title>          |<i>|<i>|<i>| | (a)
| +-----------------------+---+---+---+ |
| |                       |   |   |   | |
| |                                   | |
| |   <actual content (colspan=4)>    | | (*)
| |                                   | |
| |                       |   |   |   | |
+-+-----------------------+---+---+---+-+
(a)         (*)            (a) (a) (a) (a)


(a) ..... auto-sizing
(*) ..... star-sizing


When there is a Label inside that "actual content", which is a ContentView, the Label will be cut off on the right when it should wrap. The sample is boiled down to the minimum code necessary, resulting in two stacked Grids with 2 colums and the ContentView having a colspan of 2. Both removing the ColumnDefinitions or the outer Grid will make it render correctly, so the error seems to originate from this combination.

Tested with:
Xamarin.Forms 2.3.5.256-pre6: BAD
Comment 1 Jimmy [MSFT] 2017-07-07 16:16:16 UTC
I was able to reproduce this issue with the attached project. The issue is still occurring with the 2.3.6.116-nightly build. I will confirm the report and we will investigate further.

However, I did notice that if you define a RowDefinition with auto height for the outer Grid, the issue was resolved in the repro project. So this might be a potential workaround for your project in the meantime.
Comment 2 Matthias 2017-12-12 09:57:18 UTC
This is now tracked on GitHub: https://github.com/xamarin/Xamarin.Forms/issues/1343