How to make full screen mode, without covering the taskbar using :wpf c#

Evgeni Velikov picture Evgeni Velikov · Jan 26, 2016 · Viewed 16.1k times · Source

I need to change windows taskbar in my WPF application. For that I set WindowStyle="None", which means to disable the windows taskbar, and make custom taskbar with buttons for restoring, minimizing and closing the application. Now my problem is if the application is in maximize mode then I can't see the start menu on windows.

I found a similar question here, but when I tried this code it didn't compile. full screen mode, but don't cover the taskbar

How can I create my own taskbar and able to see the windows start menu when I maximized it? Is there a property window in xaml which can set it?

Answer

Pikoh picture Pikoh · Jan 26, 2016

You may try this:

MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;