MahApps.Metro.SimpleChildWindow
MahApps.Metro.SimpleChildWindow copied to clipboard
IsAnyDialogOpen (MahApps) not working for child windows
Imported from https://github.com/MahApps/MahApps.Metro/issues/3223
IsAnyDialogOpen property is set to false although a child window is shown using the ShowChildWindowAsync by the MahApps.Metro.SimpleChildWindow extension
What steps will reproduce this issue?
var result = await this.ShowChildWindowAsync<bool>(new UserControl { IsModal = false });
// somewhere else in code
if (this.IsAnyDialogOpen == false)
MessageBox.Show("you shouldn' see this);
Expected outcome
Property should return TRUE if there is a child window shown. Otherwise there should be another property for it.
Environment
- MahApps.Metro 1.6.1
- MahApps.Metro.SimpleChildWindow 1.5
- Windows OS Win10
- Visual Studio 2017
- .NET Framework 4.7
Is there any possibility to fix this issue? How do I know if any dialog is open? Background Information: I watch ESC-Keypresses to close my window and would like to ignore this if any ChildWindow is open. Thanks!