Bug 32571 - Text overflow in a ViewCell
Summary: Text overflow in a ViewCell
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.4
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-29 09:27 UTC by Jeremy Kairis
Modified: 2015-07-30 03:41 UTC (History)
2 users (show)

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


Attachments
Exemple solution (160.77 KB, application/zip)
2015-07-29 09:27 UTC, Jeremy Kairis
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 ANSWERED

Description Jeremy Kairis 2015-07-29 09:27:58 UTC
Created attachment 12272 [details]
Exemple solution

The Text of a Label in a StackLayout, in a ViewCell.View overflow out of the ListView.ItemTemplate.
Comment 1 Chris King 2015-07-29 12:41:12 UTC
Thanks for submitting this issue. You can cause the view cell to measure it's contents before deciding on its height by specifying HasUnEvenRows as so:

 		<ListView x:Name="itemListView" HasUnevenRows="true">

This is not the default for performance reasons; measuring the height of cells takes time and in some instance can slow the list view down to an unacceptable degree.

Warm regards,
XFT
Comment 2 Stephane Delcroix 2015-07-29 14:44:40 UTC
Chris, I had a talk with Jeremy. He knows about HasUnevenRows. The problem is, when there is a StackLayout in the ViewCell, there's no clipping, like it should be.

Reopening then.
Comment 3 Stephane Delcroix 2015-07-30 03:41:54 UTC
After doing some investigation, that's truly how StackLayout is supposed to work, an dit works slightly differently from a Grid.

By default, a StackLayout doesn't clip to bounds, but you can enable that behavior easily:

    <StackLayout VerticalOptions="Fill" IsClippedToBounds="true">

The fact that it's clipped in Android is inherent to the difference between platforms.

Hope it helps.