Bug 59592 - ScrollView with Padding has incorrect ContentSize
Summary: ScrollView with Padding has incorrect ContentSize
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-09-20 02:07 UTC by Matthew Percy
Modified: 2017-09-20 16:05 UTC (History)
3 users (show)

Tags: scrollview, padding, ac
Is this bug a regression?: ---
Last known good build:

A test project exhibiting the issue (6.06 MB, application/x-7z-compressed)
2017-09-20 02:07 UTC, Matthew Percy

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 59592 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 Matthew Percy 2017-09-20 02:07:43 UTC
Created attachment 24824 [details]
A test project exhibiting the issue

See attached sample. There are two buttons to increase/decrease padding to see the ContentSize changes.

If Padding is set on the ScrollView, the ContentSize calculation seems to be off (eg. with Left and Right padding set to 20 either side, and the content being 1000 wide, ContentSize comes back with a width of 1080)

This primarily effects iOS, since changes to the ContentSize appear to affect how far across the ScrollView can scroll. On Android, it doesn't look like the renderer uses ContentSize, which means behaviour on the Android side seems fine.

Please let me know if you need me to elaborate further, or provide more examples.
Comment 1 Matthew Percy 2017-09-20 02:28:02 UTC
This might be related to the change from commit b4a46d482f4b511de7e829f1cfe16aa81057560a
Comment 2 Paul DiPietro [MSFT] 2017-09-20 16:05:47 UTC
There is a clear difference between Android and iOS. Also checked against the 2.4.0-pre3 build.