Followup fix for ScrollViewerAssist PR#4016
Open
nicolaihenriksen wants to merge 4 commits intomasterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3439
The last PR (#4015) only partially fixed the issue, and actually introduced another issue. So this PR reverts the changes done in that PR, and adds what I hope to be a proper fix. It covers 2 "features": HorizontalScroll (in the
TabControlheaders with mouse tilt), and BubbleVerticalScroll (e.g. in theTabControlheader to bubble the scroll event when the capturingScrollViewer"does not need it").The attached property (2 of them, one for each feature) is needed to hold on to the hook instance for the scenario where we unregister the hook in the
Unloadedevent (where we don't have access to the local function).The PR also encapsulates the event registrations/deregistrations into methods simply to have a better overview of when things are registered/unregistered, and to have a centralized way of avoiding double registrations (I believe the
Loaded/Unloadedare prone to asymmetry).