Skip to content

Followup fix for ScrollViewerAssist PR#4016

Open
nicolaihenriksen wants to merge 4 commits intomasterfrom
issue3439
Open

Followup fix for ScrollViewerAssist PR#4016
nicolaihenriksen wants to merge 4 commits intomasterfrom
issue3439

Conversation

@nicolaihenriksen
Copy link
Contributor

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 TabControl headers with mouse tilt), and BubbleVerticalScroll (e.g. in the TabControl header to bubble the scroll event when the capturing ScrollViewer "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 Unloaded event (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/Unloaded are prone to asymmetry).

@nicolaihenriksen nicolaihenriksen added this to the 5.3.1 milestone Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using a TabControl triggers a TargetInvocationException at App shutdown, when the WPF Control is hosted in a Winform Elementhost

1 participant