-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
I was able to complete my MsgBox service with the same API as in my previous modal dialog version (Link), except the new one is build with the design from MahApps.Metro: Link.
I have found a minor issue in this process which is that you can use key down or ALT Key to have the focus wander off into the menu or the Window control buttons (close, maximize, minimize). This can be best verified if you open a dialog that has no default focus element, such as, the Progress Dialog.
The ALT Problem can be verified in any dialog, though.
My solution for this fix is to add a new dependency property called: IsContentDialogVisible.
This property is to true when there is one or more dialogs open.
This dependency property is used to:
- add a MetroWindow trigger that makes the Window buttons non-focusable when IsContentDialogVisible == true (Link).
- and disable the Menu via InverseBooleanConverter when a dialog is shown (https://github.com/Dirkster99/MDemo/blob/master/MDemo/MainWindow.xaml)
I am wondering if there is a better solution to these problems. But I am also happy with my current solution. So, I thought it might be useful input for this project as well.