Nested ScrollViewers #8335
Unanswered
PetrAltman
asked this question in
Q&A
Replies: 1 comment
-
I found the solution: Add hander of PointerWheelChangedEvent for handledEvents in the InnerScroll and set e.Handled to false if user scrolls vertically: InnerScroll.AddHandler(UIElement.PointerWheelChangedEvent, new PointerEventHandler(PointerWheelChangedHack), handledEventsToo: true);
private void PointerWheelChangedHack(object sender, PointerRoutedEventArgs e)
{
var properties = e.GetCurrentPoint((UIElement)sender).Properties;
if (!properties.IsHorizontalMouseWheel)
e.Handled = false;
} But it would be nice if this behavior could be done only by setting some properties of scrollviewer without attaching the handler. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two nested ScrollViews:
The current behavior is as follows:
I want the outer scrollview to scroll vertically when I scroll by the mouse wheel vertically inside the inner scrollview.
Is there any way how to set scrollviewer to behave this way? (Even with some code behind?)
Beta Was this translation helpful? Give feedback.
All reactions