We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff5b01a commit 7a44f89Copy full SHA for 7a44f89
Rubberduck.Core/UI/Controls/PersistGroupExpandedStateBehavior.cs
@@ -45,16 +45,15 @@ protected override void OnAttached()
45
base.OnAttached();
46
47
// Ensure the visual tree is fully loaded before trying to access parents
48
- AssociatedObject.Dispatcher.BeginInvoke(new System.Action(() =>
49
- {
+ AssociatedObject.Dispatcher.InvokeAsync(() => {
50
var states = GetExpandedStateStore();
51
var expanded = !states.ContainsKey(GroupName ?? string.Empty) ? (bool?)null : states[GroupName ?? string.Empty];
52
53
AssociatedObject.IsExpanded = expanded ?? InitialExpandedState;
54
55
AssociatedObject.Expanded += OnExpanded;
56
AssociatedObject.Collapsed += OnCollapsed;
57
- }));
+ });
58
}
59
60
0 commit comments