3

If the auto-hide of Windows 10 TaskBar is ON then when the app is running will cover it and there is no way to get to the TaskBar with the mouse cursor. Any way to solve this?

mc:Ignorable="d" WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
fpuglap
  • 109
  • 1
  • 2
  • 15

1 Answers1

1

This is one of the biggest problems with the WindowChrome/WindowStyle="None" functionality in WPF. I don't know a 100% full proof way of handling it. The best way I've been able to find online is to use some interop to manually handle the Window's WndProc function and intercept the WM_GETMINMAXINFO message. This message controls the dimensions for a maximized window. Using this method, you can subtract a pixel or two from the maximized dimensions so that the taskbar can poke through.

Since the taskbar can be positioned in different corners of the screen, you can use some more interop to detect the current location of the taskbar. Like I said, this method doesn't work perfectly. Sometimes the taskbar gets stuck behind the window. Until someone posts a better method, it's the best I've been able to find. Here's a code sample (not mine) that I found on GitHub:

https://gist.github.com/MortenChristiansen/6463580

CJF
  • 147
  • 3
  • 15