Bug 39540 - StackView in ScrollView not scrolling on Windows 10 Mobile
Summary: StackView in ScrollView not scrolling on Windows 10 Mobile
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: 2016-03-11 09:11 UTC by blitzillu
Modified: 2016-03-15 13:42 UTC (History)
1 user (show)

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


Attachments
Sample project demonstrating the issue (3.51 MB, application/zip)
2016-03-14 09:20 UTC, blitzillu
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 FIXED

Description blitzillu 2016-03-11 09:11:55 UTC
My setup:

Xamarin.Forms v2.1.0.6526 (NuGet package)
Xamarin Forms 2.0.0.6482 (Installed)
Windows 10
Visual Studio Professional 2015
Xamarin 4.0.1.145 (f869dba)

If you use a StackView in a ScrollView the scroll view doesn't scroll on Windows 10 Mobile (UWP project). It does work on Android and iOS. You can test it for yourself:

public App()
{
    var layout = new StackLayout
    {
        Orientation = StackOrientation.Vertical,
        Padding = 0,
        Children =
            {
                new Button { Text = "A" },
                new Button { Text = "B" },
                new Button { Text = "C" },
                new Button { Text = "D" },
                new Button { Text = "E" },
                new Button { Text = "F" },
                new Button { Text = "G" },
                new Button { Text = "H" },
                new Button { Text = "I" },
                new Button { Text = "J" },
                new Button { Text = "K" },
                new Button { Text = "L" },
                new Button { Text = "M" },
                new Button { Text = "N" },
                new Button { Text = "O" },
                new Button { Text = "P" },
                new Button { Text = "Q" },
                new Button { Text = "R" },
                new Button { Text = "S" },
                new Button { Text = "T" },
                new Button { Text = "U" },
                new Button { Text = "V" },
                new Button { Text = "W" },
                new Button { Text = "X" },
                new Button { Text = "Y" },
                new Button { Text = "Z" },
            },
    };
    var scrollView = new ScrollView { Content = layout };

    // The root page of your application
    MainPage = new ContentPage
    {
        Content = scrollView,
    };
}

Or you could also do this in a shorter way:

StackLayout stack = new StackLayout
{
	Padding = new Thickness(20),
};

for (var i = 0; i < 100; i++)
	stack.Children.Add(new Button { Text = "Foo" });

var scrollview = new ScrollView
{
	Content = stack,
};


MainPage = new ContentPage
{
	//Content = scrollview,
	Content = stack,
};

BTW: The documentation here https://developer.xamarin.com/api/type/Xamarin.Forms.ScrollView/ is wrong. The code can't be implemented as described. Also you can see here that the code above should work.
Comment 1 Samantha Houts [MSFT] 2016-03-11 18:38:37 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.

Warm regards,
Xamarin Forms Team
Comment 2 blitzillu 2016-03-14 09:20:03 UTC
Created attachment 15396 [details]
Sample project demonstrating the issue

I left out some folders (e.g. packages). Otherwise I'm not able to submit the project without hitting the 8000 KB filesize limit. Hope the project does work for you.
Comment 3 blitzillu 2016-03-14 09:23:41 UTC
I think I didn't mentioned that I'm testing directly on a Microsoft Lumia 650. Version: 1511
Build: 10.0.10586.164
Comment 4 Samantha Houts [MSFT] 2016-03-14 18:01:54 UTC
This has been resolved in 2.1.0. Please try updating your project to confirm. Thank you!
Comment 5 blitzillu 2016-03-15 13:42:04 UTC
Thanks for the info. I can confirm that this has been fixed.