punker76 / MahApps.Metro.SimpleChildWindow

A simple child window for MahApps.Metro
MIT License
374 stars 55 forks source link

IsAnyDialogOpen (MahApps) not working for child windows #73

Open punker76 opened 6 years ago

punker76 commented 6 years ago

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

thbiela commented 5 years ago

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!