File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
265265 // Don't attempt to Invoke if _restoreFocusDialogClose hasn't been assigned yet. Can occur
266266 // if the MainWindow has started up minimized. Even when Show() has been called, this doesn't
267267 // seem to have been set.
268- dialogHost . Dispatcher . InvokeAsync ( ( ) => dialogHost . _restoreFocusDialogClose ? . Focus ( ) , DispatcherPriority . Input ) ;
268+ dialogHost . Dispatcher . InvokeAsync ( ( ) => dialogHost . _restoreFocusDialogClose ? . Focus ( ) , DispatcherPriority . Input ) ;
269269
270270 return ;
271271 }
@@ -289,6 +289,7 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
289289 dialogHost . Dispatcher . BeginInvoke ( DispatcherPriority . Background , new Action ( ( ) =>
290290 {
291291 var child = dialogHost . FocusPopup ( ) ;
292+ CommandManager . InvalidateRequerySuggested ( ) ;
292293
293294 //https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/issues/187
294295 //totally not happy about this, but on immediate validation we can get some weird looking stuff...give WPF a kick to refresh...
Original file line number Diff line number Diff line change 11using System ;
2+ using System . Windows . Input ;
23using System . Windows . Threading ;
34
45namespace MaterialDesignThemes . Wpf
@@ -40,7 +41,11 @@ public void UpdateContent(object content)
4041
4142 _owner . AssertTargetableContent ( ) ;
4243 _owner . DialogContent = content ;
43- _owner . Dispatcher . BeginInvoke ( DispatcherPriority . Background , new Action ( ( ) => _owner . FocusPopup ( ) ) ) ;
44+ _owner . Dispatcher . BeginInvoke ( DispatcherPriority . Background , new Action ( ( ) =>
45+ {
46+ _owner . FocusPopup ( ) ;
47+ CommandManager . InvalidateRequerySuggested ( ) ;
48+ } ) ) ;
4449 }
4550
4651 /// <summary>
You can’t perform that action at this time.
0 commit comments