2

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.

ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Rather than relying on being notified, wouldn't it be better to disable scrolling preemptively? https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.scrollviewer.verticalscrollmode.aspx – Kevin Gosse Oct 23 '15 at 13:44
  • 1
    @KooKiz Thanks, But that's not a (good) option. (That's why I wrote the second paragraph in my question. The one in parentheses.) – ispiro Oct 23 '15 at 13:46
  • Could always watch the [VerticalOffset](https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.scrollviewer.verticaloffset) / HorizontalOffset for property change and then disable scrolling a few different ways. – Chris W. Oct 23 '15 at 15:56

0 Answers0