Page 1 of 1

How to stop manipulation inertia in ListBox/ScrollViewer?

Posted: 03 Feb 2019, 23:03
by nokola
I have a ListBox with list of fonts that the user can scroll through and a separate control for paging through the fonts.
pagescroll.png
pagescroll.png (28.25 KiB) Viewed 1365 times
When the user switches to another page, I replace the contents of the ListBox with another set of fonts and scroll to position 0.
There are situations when a user starts scrolling the ScrollViewer using touch on phone, then realizes they want to switch to another page and quickly presses the page switch buttons.

When the above happens, the ListBox keeps scrolling even though its contents are now different.
How do I cancel the inertia velocity for the ListBox to "stop it in its tracks"? :)

Thanks!

Re: How to stop manipulation inertia in ListBox/ScrollViewer?

Posted: 05 Feb 2019, 21:01
by jsantos
It seems we have something missing here. How would you achieve that in WPF? Could you please report a ticket about it and follow the discussion there?

Thanks!

Re: How to stop manipulation inertia in ListBox/ScrollViewer?

Posted: 05 Feb 2019, 21:01
by jsantos

Re: How to stop manipulation inertia in ListBox/ScrollViewer?

Posted: 05 Feb 2019, 23:17
by nokola
I would assume it "just works" when I call ScrollToHorizontalIndex()

There's no scenario I can think of where ScrollTo...() would have the control keep scrolling based on random previous user action.

Opened https://www.noesisengine.com/bugs/view.php?id=1405