MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
DialogHost nested z-order changes when application loses focus
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nested DialogHost setup shown in the issue with MainWindow losing focus to another Windows application. Trace how nested DialogHost instances manage z-order and focus, then verify that the previously frontmost sub dialog remains visible and usable after focus returns, including when CloseOnClickAway is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100