简体   繁体   English

如何在c#和wpf中实现scrollviewer弹跳的动画?

[英]How to implement scrollviewer bouncing's animation in c# and wpf?

I want to implement scrollviewer bouncing's animation in c# and wpf, like IOS's UIScrollview. 我想在c#和wpf中实现scrollviewer弹跳的动画,就像IOS的UIScrollview一样。

When users scroll to top or end, it starts to decrease speed and bouncing. 当用户滚动到顶部或底部时,它开始降低速度并弹跳。

I think that google can search related issues, but i can not find. 我认为Google可以搜索相关问题,但我找不到。

Does anyone have similar experiences? 有没有类似的经历?

Well for touch manipulation, WPF already has some built in support for this. 对于触摸操作,WPF已经为此提供了一些内置支持。 Take a look at the ReportBoundaryFeedback method and ManipulationBoundaryFeedback event. 看一下ReportBoundaryFeedback方法和ManipulationBoundaryFeedback事件。 I believe the ScrollViewer automatically uses this when touch panning (see PanningMode ). 我相信ScrollViewer在触摸平移时会自动使用它(请参见PanningMode )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM