Bug 41600 - ListView.ScrollTo does not behave as per documentation on UWP
Summary: ListView.ScrollTo does not behave as per documentation on UWP
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-08 15:06 UTC by John Hardman
Modified: 2017-07-18 05:57 UTC (History)
8 users (show)

Tags: Xamarin.Forms UWP ListView ScrollTo Exception ac Windows
Is this bug a regression?: ---
Last known good build:

Sample project File (1.64 KB, application/x-zip-compressed)
2017-07-12 08:44 UTC, Jacky Waswani
Logs attached (7.21 KB, application/x-zip-compressed)
2017-07-12 08:45 UTC, Jacky Waswani
repro project (296.02 KB, application/x-zip-compressed)
2017-07-14 17:17 UTC, Jimmy [MSFT]

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 Hardman 2016-06-08 15:06:22 UTC
In the Xamarin.Forms documentation at https://developer.xamarin.com/api/member/Xamarin.Forms.ListView.ScrollTo/p/System.Object/Xamarin.Forms.ScrollToPosition/System.Boolean/

it says:

ArgumentException	position contains an invalid value for ScrollToPosition.

Whilst this exception is thrown on Android, it is not thrown on UWP, giving the impression that things are working even though there is an issue in the application code. The UWP implementation should throw the exception as per the documentation.

This is using Xamarin.Forms

To reproduce, just pass a duff value for the first argument in
public Void ScrollTo (Object item, ScrollToPosition position, Boolean animated)
Comment 1 E.Z. Hart [MSFT] 2016-07-08 22:03:57 UTC
Confirmed still occurring in
Comment 2 Rui Marinho 2017-02-17 10:50:51 UTC
Should be fixed in 2.3.5-pre1
Comment 3 Jacky Waswani 2017-07-12 08:34:55 UTC
Have verified the bug with latest forms build version

Issue is seems to be reproducible with latest build as well.

Attaching the logs files , Screencast & the sample created for more Info.

Screencast : https://www.screencast.com/t/50Xzqk4ljWQ

Build Info: https://gist.github.com/GLjackyvaswani/600433ce6f3b92544b42d0392001d326
Comment 4 Jacky Waswani 2017-07-12 08:44:56 UTC
Created attachment 23486 [details]
Sample project File

As the project size is large, have attached the files changed.

Created Sample forms app, Change the MainPage.xaml & .cs file with the code attached.
Comment 5 Jacky Waswani 2017-07-12 08:45:26 UTC
Created attachment 23487 [details]
Logs attached
Comment 6 Jimmy [MSFT] 2017-07-14 17:17:11 UTC
Created attachment 23569 [details]
repro project

I am attaching a complete repro project that I tested with. I was able to reproduce the crash on Android when using Forms However the crash no longer occurs when using Forms 2.3.5-pre6.

Just to clarify, we have aligned the behavior on all platforms to be that there is _not_ a crash in this scenario. This means that the docs still require an update to reflect this change.
Comment 7 Saurabh Paunikar 2017-07-18 05:57:00 UTC
Verified on xamarin.form version using attached sample,issue is not reproduce which was there on xamarin.form version marking it as verified

ScreenCast link : https://www.screencast.com/t/2juWssRY80iC