MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Modal is always on top even if application has no focus

Open
#2,841 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

### Bug explanation

Hi,

My WPF app is set to startup at Windows launch, when it opens it checks if the end user has added their credentials, and if not asks for them in a modal. However, even if the Mainwindow does not have focus, the modal still goes on top of any other open application.

Is this something that can be changed with some (minor) tweaks?

Screenshot below showing modal over File Explorer (which has focus), with main app behind that.
![image](https://user-images.githubusercontent.com/913981/188880790-2442bc2a-cbb3-4980-a6de-77cfef0de13f.png)

### Version

4.5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points. Reproduce the WPF startup flow with missing credentials while another application has focus, then trace the modal window behavior. Done means the credential modal no longer appears above the focused application when the main window is unfocused.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.