2

I have a WPF window which appears on the bottom right of the screen above the taskbar with topmost set to true. Some Windows7-users reported that when they open the window via the tasbar menu icon, the Windows taskbar settings window appears above the app window (doesn't happen on Windows10).

To show what happens, i made a gif: windows overlapping

On the same machine, the DropBox pop-up shows above the Windows taskbar settings window. Any ideas how to solve this?

Community
  • 1
  • 1
casaout
  • 1,819
  • 3
  • 24
  • 54
  • 2
    So you would like a window thats *more TopMost* than a focused topmost window?. All those System menus are topmost. –  Jul 22 '16 at 23:34

1 Answers1

1

You could handle the Window.Deactivated event (occurs when the current window loses focus) and set the TopMost property to true again.

private void Window_Deactivated(object sender, EventArgs e)
{
    // The Window was deactivated 
    this.TopMost = true;
}

This is not actually a solution, as it doesn't guarantee your window will always be on top (for example, another app might be using the same approach), but it will get you closer to what you want.

snickro
  • 475
  • 4
  • 6