Mahapps.metro: Mahapps window steals focus

Created on 26 Jun 2017  路  3Comments  路  Source: MahApps/MahApps.Metro

What is the issue?

MahApps window sometimes steals focus in our application. As it turned out, it can steal the focus in the official test app as well:

Reproduction video

What steps will reproduce this issue?

  1. Start MahApps.Metro.Demo.NET45
  2. Click on VS button
  3. Go back to main window
  4. Maximize
  5. Minimize
  6. Maximize back from taskbar (click on main window on taskbar)

Now it steals focus

Expected outcome

It should not steal the focus

Environment

  • MahApps.Metro: 1.5.0.0.
  • Windows OS: Windows 10 creators update
  • Visual Studio 2017
  • .NET Framework 4.5
Bug

Most helpful comment

@bardospeter @JerryJian This is fixed now and will be available in 1.6.0 (also available in latest pre-release)

All 3 comments

Sorry, made the link public now

I encountered a lost-focus problem when I launch a metro window as dialog window (new MetroWindow().ShowDialog()). I remove GlowWindowBehavior in my metro window style.
Because I found that it will create 4 windows around the main window in order to implement shadow effect, and sometimes one of them will capture the focus. You can try to custom metro window style and remove GlowWindowBehavior.

GlowWindowBehavior here

@bardospeter @JerryJian This is fixed now and will be available in 1.6.0 (also available in latest pre-release)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barryBithead picture barryBithead  路  5Comments

Zebody picture Zebody  路  4Comments

alan0428a picture alan0428a  路  4Comments

johanneswanzek picture johanneswanzek  路  3Comments

BornToBeRoot picture BornToBeRoot  路  3Comments