Prevent a ScrollViewer's scrolling conditionally

独自空忆成欢 提交于 2019-12-13 16:27:18

问题


Is there any way to not only be notified of a ScrollViewer's scroll, but to be able to prevent it. Something like a ScrollChanging event so I can set e.Cancel to true?

(I don't want to disable scrolling, nor do I want to implement it myself because it seems impossible to get the ScrollBar's events to detect a user dragging them. At least in UWP.)

The problem is that ScrollViewer_PointerWheelChanged isn't raised when it scrolls. Only when it doesn't have any need to scroll does it fire.

来源:https://stackoverflow.com/questions/33303617/prevent-a-scrollviewers-scrolling-conditionally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!