Skip to content

fix(DialogHost): Improve reliability of visual state monitoring - #4088

Merged
Keboo merged 1 commit into
masterfrom
switchToUsingAPs
Sep 4, 2026
Merged

fix(DialogHost): Improve reliability of visual state monitoring#4088
Keboo merged 1 commit into
masterfrom
switchToUsingAPs

Conversation

@Keboo

@Keboo Keboo commented Sep 4, 2026

Copy link
Copy Markdown
Member

Refactors VisualStateMonitor to track states via attached properties that are explicitly updated by XAML Storyboard animations. This change decouples state tracking from potentially inconsistent VisualStateGroup.CurrentStateChanged events.

By having animations directly update the monitor's CurrentState attached property, the monitor now accurately reflects the visual state transitions for DialogHost's open/closed animations. This enhances the robustness and reliability of asynchronous state waiting methods, such as WaitForOpened and WaitForClosed.

Fixes: #4086

Refactors `VisualStateMonitor` to track states via attached properties that are explicitly updated by XAML Storyboard animations. This change decouples state tracking from potentially inconsistent `VisualStateGroup.CurrentStateChanged` events.

By having animations directly update the monitor's `CurrentState` attached property, the monitor now accurately reflects the visual state transitions for `DialogHost`'s open/closed animations. This enhances the robustness and reliability of asynchronous state waiting methods, such as `WaitForOpened` and `WaitForClosed`.

Fixes: #4086
@Keboo Keboo added this to the 5.4.0 milestone Sep 4, 2026
@Keboo
Keboo enabled auto-merge (squash) September 4, 2026 05:51
@Keboo
Keboo merged commit dd9c38a into master Sep 4, 2026
2 checks passed
@Keboo
Keboo deleted the switchToUsingAPs branch September 4, 2026 06:09
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.

DialogHost.WaitFor* methods not waiting for animation to finish

1 participant