Hi Bryson Scales,
Instead of passing the scrollview.ScrollY directly as a
parameter to listView.ScrollTo, try storing the value of scrollview.ScrollY in
a variable. Refer the code snippet below:
|
var scrollPosition =
scrollview.ScrollY;
listView.ScrollTo(scrollPosition);
|
By storing the scrollview.ScrollY value in a variable before
passing it to listView.ScrollTo, you can ensure that you're providing a valid
and consistent scroll position value, which leads to the expected behavior of
maintaining the scroll position after changing the ItemsSource of the
SfListView.
I have attached the working sample for your reference. Both in Android and iOS,
the sample works as expected.
Attachment:
185181Scroll_af9b7611.zip