Bug 36173 - ScrollView not scrolling
Summary: ScrollView not scrolling
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-23 16:45 UTC by Stacy Henwood
Modified: 2016-04-13 20:09 UTC (History)
5 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Stacy Henwood 2015-11-23 16:45:48 UTC
I have a ScrollView thus:

      <ScrollView VerticalOptions="FillAndExpand" x:Name="ScrollTestEntry" BackgroundColor="Red" Orientation="Vertical" >

        <Grid x:Name="TestEntryArea" VerticalOptions="Start" RowSpacing="10" Padding="30,10,30,0">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="7*"/>
          </Grid.ColumnDefinitions>
        </Grid>

      </ScrollView>

The "TestEntryArea" Grid internally is filled at runtime programmatically.

The ScrollView ends up being 232 pixels in height and the Grid ends up being 275+ pixels in height. The content is visibly clipped but it refuses to scroll.
Comment 1 Thomas Williams 2015-11-24 09:51:21 UTC
To add to @stacyh, the sample provided by Xamarin (See github link below) does not work.
https://github.com/conceptdev/xamarin-forms-windows-preview/tree/master/WorkingWithListview

As a note, upgrading our application to Xamarin 2.0.0 has made it unusable on the Windows Phone.
Comment 2 Dominik Weber 2015-11-29 02:13:09 UTC
I can confirm this bug. I think it is related to the following line inside the setter for VisualElementTracker.Container:

this.container.put_ManipulationMode(32);

I don't know what they're trying to achieve with the value 32 (32=Scale), but it seems to break scroll views. I noticed this bug using Windows UWP preview, but I think it is the same for windows phone.
Comment 3 Dominik Weber 2015-12-01 17:49:20 UTC
this seems to be resolved with Xamarin.Forms 2.0.0.6487
Comment 4 Arvind Joshi 2016-01-04 10:16:17 UTC
This is not working in Android even in Xamarin.Forms 2.0.0.6490.
My app uses CustomTheme and I have set 
<item name="android:nestedScrollingEnabled">true</item> to enable nested scrolling. I have a ListView inside a ScrollView. The ListView is populated at run time based on user action. The app crashes with "java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.NestedScrollingChildHelper.setNestedScrollingEnabled(boolean)' on a null object reference" on the line base.OnElementChanged(e) of the CustomListViewRenderer. The code works perfectly on Xamarin.Forms versions 1.3.3.6323 and 1.5.0.6447
Comment 5 John Hardman 2016-01-11 23:50:29 UTC
I am using Xamarin.Forms 2.0.0.6490, but ScrollView is still not scrolling on WinPhone 8.1 . It is fine on Windows, Android and iOS, but not WinPhone 8.1
Comment 6 Arvind Joshi 2016-01-12 04:06:21 UTC
@John Hardman, we don't have any issue with ScrollView scrolling. If anything the ScrollView is scrolling fine but not a ListView inside the ScrollView. This was working on prior versions.
Comment 7 John Hardman 2016-01-12 12:53:19 UTC
As per Thomas Williams' comment above - ScrollView not working makes my app completely unusable on WinPhone 8.1 . This is a critical issue. Is there any update on when it is expected to be fixed? It is not working in 2.0.0.6490
Comment 8 John Hardman 2016-01-12 14:44:05 UTC
Ah, just found the trigger for the problem on WinPhone 8.1. For me, this is no longer critical (it may still be for Thomas Williams though).

To work around a Xamarin bug on Windows desktop ( https://bugzilla.xamarin.com/show_bug.cgi?id=32213 ), I had added some code on Windows to move the navigation page up a bit, and to then pad content pages. That is currently still required on Windows desktop. However, that same piece of code was also being executed on Windows 8.1 phones. What I have found is that the moment I do the following on a Windows 8.1 phone, ScrollViews stop scrolling vertically:

                    navigationPage.TranslationY = -40; 

I have now added a check for the Idiom, so that this only gets executed on Windows desktops (I need to check what happens for Idiom.Tablet). Getting rid of that one line on Windows phones solves the scrolling issue for me.
Comment 9 Paul DiPietro [MSFT] 2016-04-13 20:09:03 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.


For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team