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
265
265
// Don't attempt to Invoke if _restoreFocusDialogClose hasn't been assigned yet. Can occur
266
266
// if the MainWindow has started up minimized. Even when Show() has been called, this doesn't
267
267
// seem to have been set.
268
- dialogHost . Dispatcher . InvokeAsync ( ( ) => dialogHost . _restoreFocusDialogClose ? . Focus ( ) , DispatcherPriority . Input ) ;
268
+ dialogHost . Dispatcher . InvokeAsync ( ( ) => dialogHost . _restoreFocusDialogClose ? . Focus ( ) , DispatcherPriority . Input ) ;
269
269
270
270
return ;
271
271
}
@@ -289,6 +289,7 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
289
289
dialogHost . Dispatcher . BeginInvoke ( DispatcherPriority . Background , new Action ( ( ) =>
290
290
{
291
291
var child = dialogHost . FocusPopup ( ) ;
292
+ CommandManager . InvalidateRequerySuggested ( ) ;
292
293
293
294
//https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/issues/187
294
295
//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 1
1
using System ;
2
+ using System . Windows . Input ;
2
3
using System . Windows . Threading ;
3
4
4
5
namespace MaterialDesignThemes . Wpf
@@ -40,7 +41,11 @@ public void UpdateContent(object content)
40
41
41
42
_owner . AssertTargetableContent ( ) ;
42
43
_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
+ } ) ) ;
44
49
}
45
50
46
51
/// <summary>
You can’t perform that action at this time.
0 commit comments