-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward pointer wheel event from scrollbar to scrollviewer #16398
Conversation
You can test this PR using the following package version. |
You can test this PR using the following package version. |
// We need to handle pointer wheel event to allow scrolling with the pointer wheel. So we raise the event on the scrollviewer's presenter | ||
if(!e.Handled && _owner?.Presenter is { } presenter) | ||
{ | ||
presenter.RaiseEvent(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By re-raising the same RoutedEventArgs
, this will change the observable RoutedEventArgs.Source
and Route
, so parent listeners will have wrong information to act on (e.g. Tunnel
mode in a middle of a Bubble
).
I think a copy of the event should be raised instead to avoid this.
The original event probably needs to be marked as handled if the copy is handled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update done.
You can test this PR using the following package version. |
You can test this PR using the following package version. |
What does the pull request do?
Raises PointerWheelEvent on the scrollviewer's presenter by ScrollBar when it receives a PointerWheelChanged event.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #16372