Bug 36670 - ScrollView calculates height incorrectly if word wrap used in nested views
Summary: ScrollView calculates height incorrectly if word wrap used in nested views
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-12-07 11:57 UTC by John Hardman
Modified: 2017-09-07 03:08 UTC (History)
5 users (show)

Tags: ScrollView, uwp, android, Label WordWrap Height ac, retest
Is this bug a regression?: ---
Last known good build:

Source code that demonstrates issue (3.39 KB, application/zip)
2015-12-07 11:57 UTC, John Hardman
Screenshot showing problem (53.79 KB, image/png)
2016-01-13 00:39 UTC, John Hardman

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 36670 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 John Hardman 2015-12-07 11:57:27 UTC
Created attachment 14143 [details]
Source code that demonstrates issue

On WinPhone 8.1 RT, if a ScrollView has descendants that are Labels with LineBreakMode = LineBreakMode.WordWrap, the layout calculations within XF are incorrect. As a result, items near the bottom of the ScrollView may not be visible at all, or may be visible whilst the user is scrolling but move off the display the moment the user removes contact with the display.

The attached source file demonstrates this problem. The last Label has the text "Expect this to be visible", but on WinPhone 8.1 RT, on this text is not visible.

(Possibly related to Bug 31974 which is for Windows platform - perhaps the code is shared between WinPhone and Windows inside XF?)
Comment 1 John Hardman 2016-01-13 00:39:47 UTC
Created attachment 14564 [details]
Screenshot showing problem

Screenshot showing problem in actual app.

To protect IP, I have blocked out text using red blocks. However, I have shown separate blocks where text is wrapped, so that you can see where word wrap has occurred.

The very bottom red block covers just the top of the text for that row. However, the ScrollView will not permit scrolling to see the bottom of that item. It should. It seems that when text is word wrapped, the calculation of the height of the content of the ScrollView is incorrectly calculated, preventing proper display of the final item(s).
Comment 2 John Hardman 2016-01-13 00:40:52 UTC
Changing back to New after adding comment and screenshot.
Comment 3 John Hardman 2016-05-10 22:41:20 UTC
The same problem occurs on UWP using . Let me know if you need a separate bug raised.
Comment 4 John Hardman 2016-08-03 15:54:49 UTC
Still occurs on both WinRT 8.1 and UWP, using XF
Comment 5 John Hardman 2016-08-10 16:43:51 UTC
Also occurs on Android.
Comment 6 John Hardman 2017-02-23 11:44:00 UTC
Is there any update on this? It's been over a year and this is still a problem.