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?
Just set the WindowState to Maximized , and the WindowStyle to None . Also setting the Window as topmost will make sure no other Window shows up over your window.
Use the window's object WindowState property to programmaticly minimise a window. window. WindowState = WindowState.
You may try this:
MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;
Found a solution on CodeProject which may help: http://www.codeproject.com/Articles/107994/Taskbar-with-Window-Maximized-and-WindowState-to-N
WindowStyle="None"
WindowState="Maximized"
ResizeMode="NoResize"
and
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
this.Left = 0;
this.Top = 0;
this.WindowState = WindowState.Normal;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With