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

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


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;


You can easily add the constraints on height in XAML by adding:

MaxHeight="{Binding Source={x:Static SystemParameters.MaximizedPrimaryScreenHeight}}"

into the Window's tag.