This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 41600 - ListView.ScrollTo does not behave as per documentation on UWP
Summary: ListView.ScrollTo does not behave as per documentation on UWP
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-08 15:06 UTC by John Hardman
Modified: 2017-07-18 05:57 UTC (History)
8 users (show)

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


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

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:

Exceptions
TYPE	REASON
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 2.2.0.45

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 2016-07-08 22:03:57 UTC
Confirmed still occurring in 2.3.0.107.
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 2.3.5.256-pre6.

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 2.3.4.247. 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 2.3.5.256-pre6 using attached sample,issue is not reproduce which was there on xamarin.form version 2.3.4.247.Hence marking it as verified

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

Note You need to log in before you can comment on or make changes to this bug.