MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
14.91k stars 3.4k forks source link

DialogHost nested z-order changes when application loses focus #3284

Open JeffBarnard opened 11 months ago

JeffBarnard commented 11 months ago

Bug explanation

I am nesting dialoghosts so that I can stack sub dialogs. It works great for our application.

<materialDesign:DialogHost Identifier="SubDialog" CloseOnClickAway="True">
    <materialDesign:DialogHost Identifier="RootDialog" DialogTheme="Inherit" CloseOnClickAway="True">

The issue I've found is when the application (MainWindow) loses focus to another Windows application, the z-order of the dialogs is changed and the dialog that was in front is sent to the back. This often hides the sub dialog and if CloseOnClickAway is false, then the user can get stuck.

Version

4.9.0

MichelMichels commented 10 months ago

Please provide a repository with the stated behavior.

github-actions[bot] commented 9 months ago

This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.

JeffBarnard commented 9 months ago

Please provide a repository with the stated behavior.

https://github.com/JeffBarnard/MaterialDesignInXaml.3284 Here you go. To view the issue, simply open the dialogs and ALT+TAB or click another application to cause the app to lose focus and you can see the dialog order change.