question

43973816 avatar image
0 Votes"
43973816 asked RichardZhang-MSFT commented

How can I resolve the problem:UWP ScrollView back to origin y while scrolling?

I designed the Scrollview as 'IsScrollInertiaEnabled="True"'. And while I scroll the ScrollView using mouse wheel, it scroll back to the origin y. I tried many ways, but I did not solve the problem. My Question is: Is there any simple way to ban the ScrollView scrolling back to the origin y while set 'IsScrollInertiaEnabled="True"'?

Here is the screen record for the problem:

https://youtu.be/Y9LvXZ1H3c0

Best Regards,

Alex.Zhangrj

windows-uwpwindows-uwp-xaml
· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, ScrollViewer.IsScrollInertiaEnabled will still scroll a short distance in the original direction to simulate inertia according to the scrolling strength after stopping the interaction. But it will not "rebound", that is, it will not scroll backwards. Judging from your video, there may be other reasons for this problem. Can you provide a minimal reproducible demo for us to analyze this problem?

0 Votes 0 ·

Here is my code,
http://up-task.com/assets/Struggle-Compare-UWP-Scrollback-Question.zip
It's only use origin components of UWP, and coded by vs 2019.
Thanks for your help, Please help me and have a look at it.
Thanks,
Best Regards,
AlexZhangrj.

0 Votes 0 ·

Thanks a lot.

0 Votes 0 ·

Dear friend,
To demo the problem, we need to run the app and open both side folders first, and need the inner grid of the scrollview to be enough high.
Thanks for you help.
Waiting for your reply.
Thanks a lot.
Best Regards,
Alex.Zhangrj

0 Votes 0 ·

And if we turn ScrollViewer.IsScrollInertiaEnabled to be true,
The inner gird will vibrate on the top side or bottom side.
Only For your Information.
Thanks a lot.
Alex.Zhangrj

0 Votes 0 ·

Here is the demo code only one side ScrollView scrolling(please use the left side scrollview, and open both side folders). And the problem keeps on the same.
http://up-task.com/assets/Struggle-Compare-UWP-ScrollOnlyLeftSide.zip
Best Regards,
Thanks a lot,
Alex.Zhangrj.

0 Votes 0 ·

Hello, I did not reproduce your problem. I tried your two test cases, followed the steps you provided, and expanded two disk root directories (the total number of folders is close to 300), and the scrolling behavior is normal.

  • Test system: Windows10 ver 2004

  • IDE: Visual Studio 2019 ver 16.6.4.

You can try to create a blank project to test the simple ScollViewer scrolling effect. If the problem still exists, it may be a system version-specific problem (from the point of view that the new version does not have this problem, the problem may be fixed in the new version)

0 Votes 0 ·
Show more comments

0 Answers