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 87fb4eb commit 76057d0Copy full SHA for 76057d0
MaterialDesignThemes.Wpf/DialogHost.cs
@@ -265,10 +265,9 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
265
// Don't attempt to Invoke if _restoreFocusDialogClose hasn't been assigned yet. Can occur
266
// if the MainWindow has started up minimized. Even when Show() has been called, this doesn't
267
// seem to have been set.
268
- if (dialogHost._restoreFocusDialogClose != null)
269
- {
270
- dialogHost.Dispatcher.InvokeAsync(() => dialogHost._restoreFocusDialogClose.Focus(), DispatcherPriority.Input);
271
- }
+
+ dialogHost.Dispatcher.InvokeAsync(() => dialogHost._restoreFocusDialogClose?.Focus(), DispatcherPriority.Input);
272
return;
273
}
274
0 commit comments