MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.28k stars 2.45k forks source link

Automatically hidden taskbar doesn't show up over maximized MetroWindow #4070

Open nalka0 opened 3 years ago

nalka0 commented 3 years ago

Describe the bug

When the taskbar is set to hide automatically, it doesn't show up over a maximized MetroWindow. Also, still when it's maximized , there's a little gap at the bottom (or wherever the taskbar is positionned) of the MetroWindow that displays the program behind (or the Wallpaper if there's nothing behind). If you click on that gap it obviously focuses the program that was behind.

Steps to reproduce

  1. Set your taskbar to hide automatically (Right click on taskbar => taskbar settings => Automatically hide taskbar in desktop mode).

  2. Run the sample application in MahApps bug demo.zip (Unfortunately I can't post a full github repository).

  3. Maximize the MetroWindow if it isn't maximized already.

  4. Move the cursor to where your taskbar is.

  5. Taskbar doesn't show up. (And you can see the little gap I was talking about).

  6. Click on the gap. The application behind gets focus.

Expected behavior

The taskbar shows up when the cursor is over it. The little gap at the bottom (or wherever the taskbar is positionned) is filled with the MetroWindow's content.

Environment

MahApps.Metro version: v2.4.3
Windows build number: Win10 1803 [Version 17134.2087]
Visual Studio: Professional 2019 16.6.4
Target Framework: .Net Framework 4.6.1

Screenshots

MahApps bug

punker76 commented 3 years ago

@nalka0 It could be that this is an issue with your installed windows Win10 1803 [Version 17134.2087]. I used your sample on my machine which is a Win10 1909 [Version 18363.1379] and all works fine, the Taskbar shows up when I'm on the gap. I can remember that this error also occurred in earlier WIndows versions (Win7, Win8).

nalka0 commented 3 years ago

@punker76 I just found out that this problem only happens on my primary screen, if I move the MetroWindow to my secondary screen, it works as expected (my primary screen is on the left and the secondary on the right and they both have the same resolution if it matters).

It'd be weird if the problem comes from my Windows version since the taskbar works perfectly fine with every other application I use frenquently besides SourceTree (for some reasons this one has the exact same probmem).

Perhaps the bug comes from something "inside" WPF like the WIndow class?

PS : Yes I already had this problem with earlier Windows versions but I can't tell if it's all the same as now since it's been nearly than a year since I moved to Windows 10

punker76 commented 3 years ago

@nalka0 I'll test this with my other multi monitor system again.

nalka0 commented 3 years ago

@punker76 Have you got any news about this problem?

punker76 commented 3 years ago

@nalka0 No, sorry. I have tested this (without attached VS) on my machine (also with different DPI) and it works as expected.

HolgerBri commented 2 years ago

I can reproduce this behaviour only when running from VS. Starting stand alone everything works as it should

lassenie commented 1 year ago

Also seen on Windows 11. Works on secondary screen but not on primary.