Bug 21384 - Grid content inside ScrollView extends beyond the bounds on iOS
Summary: Grid content inside ScrollView extends beyond the bounds on iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-16 18:16 UTC by John Miller [MSFT]
Modified: 2015-02-05 06:11 UTC (History)
5 users (show)

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

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:

Description John Miller [MSFT] 2014-07-16 18:16:06 UTC
### Overview: 

    I have a ScrollView that has its Content set to a Grid that I am dynamically populating it's rows after loading the page's data. On Android the ScrollView behaves correctly, on iOS, the Grid renders outside of the bounds of the ScrollView.

### Steps to Reproduce: 

    Attached (private) is sample code for a page that replicates the issue.

### Actual Results: 

    Attached are two images showing the results on iOS vs Android.

### Expected Results: 

    The content would render the same on both platforms, inside the scrollview.

### Build Date & Platform: 

    XF 1.2.1
Comment 4 Eric Grover 2014-08-07 15:51:06 UTC
It is now showing the same behavior in Android (and no longer in iOS oddly enough).
Comment 5 Eric Grover 2014-08-07 15:54:28 UTC
The problem is definitely a result of dynamically adding controls to the scrollview dynamically after loading data.
Comment 8 John Miller [MSFT] 2014-08-12 17:27:10 UTC
Possible workaround:

Set IsClippedToBounds = true after binding data to the controls in the ScrollView.
Comment 9 Udham Singh 2014-08-21 09:03:17 UTC
We have tried to reproduce this issue by following the steps mentioned in comment 7 and observed that for android this is working fine. But when we try to check this issue for iOS, we are getting an error and when we clicked on 'Continue Execution' button, screen gets loaded for few seconds and observed that scroll view is not clipped inside the gray rectangle.

Screencast : http://screencast.com/t/R94gDeqAnCo

Error Log : https://gist.github.com/Udham1/fbc9e334af409baf1dce
Application Output : https://gist.github.com/Udham1/3f2c835a541dbf6afcce

Could you please check this issue with latest Xamarin.Forms version and latest stable Xamarin builds and let us know if you are still getting this issue with your environment information. You can get environment info via "Xamarin Studio -> About Xamarin Studio -> Show Details"

Also please let us know if we missed any thing to reproduce this issue.

Xamarin.Forms :

Environment Info : 

=== Xamarin Studio ===

Version 5.2.1 (build 1)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
	Mono 3.6.0 ((no/f540f8a)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 306000039

=== Xamarin.Android ===

Version: 4.14.0 (Business Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version: (Business Edition)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 606f31a
Build date: 2014-08-01 15:27:48-0400

=== Build Information ===

Release ID: 502010001
Git revision: d06832ce9807d6be24aca225457e8b37c7669f6f
Build date: 2014-08-07 12:10:47-04
Xamarin addins: 1de032531be4cecf2f39dbee3b87aac78204058c

=== Operating System ===

Mac OS X 10.9.3
Darwin Xamarin76s-Mac-mini.local 13.2.0 Darwin Kernel Version 13.2.0
    Thu Apr 17 23:03:13 PDT 2014
    root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Comment 10 Eric Grover 2014-08-21 09:10:45 UTC
I am not seeing this issue currently in iOS.  The problem does occur (without the IsClippedToBounds = true workaround) on Android in the latest stable  build, and when I tried the 1.2.3 pre-release 1, the IsClippedToBounds workaround no longer works.

BTW, I have not tried running the app in Xamarin Studio, I work in Visual Studio via the build host on the mac, so I don't know if that is the reason you are seeing the error that I am not.
Comment 11 Jason Smith [MSFT] 2015-02-05 06:11:50 UTC
This should be resolved