From 43a3a6fb88340015035620eef54bfb96966a8c39 Mon Sep 17 00:00:00 2001 From: David Kallesen Date: Fri, 7 Jun 2024 12:35:01 +0200 Subject: [PATCH] fix: MA00134 --- src/Atc.Wpf.Theming/Controls/Windows/NiceWindow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Atc.Wpf.Theming/Controls/Windows/NiceWindow.cs b/src/Atc.Wpf.Theming/Controls/Windows/NiceWindow.cs index 7fe43cb..ca77d96 100644 --- a/src/Atc.Wpf.Theming/Controls/Windows/NiceWindow.cs +++ b/src/Atc.Wpf.Theming/Controls/Windows/NiceWindow.cs @@ -1045,7 +1045,7 @@ public void HideOverlay() public void StoreFocus( IInputElement? thisElement = null) { - this.BeginInvoke(() => + this.Invoke(() => { restoreFocus = thisElement ?? restoreFocus ?? FocusManager.GetFocusedElement(this); }); @@ -1058,7 +1058,7 @@ internal void RestoreFocus() return; } - this.BeginInvoke(() => + this.Invoke(() => { Keyboard.Focus(restoreFocus); restoreFocus = null;