Make my wpf application Full Screen (Cover taskbar and title bar of window)
34,427
Solution 1
Try this:
<Window ShowTitleBar="False" IgnoreTaskbarOnMaximize="True">
Solution 2
You need to set the WindowStyle to none as well as WindowState to Maximized
<Window ...
WindowStyle="None"
WindowState="Maximized">
Solution 3
You need to set the ResizeMode to NoResize and WindowState to Maximized
<Window ...
ResizeMode="NoResize" WindowState="Maximized">
Solution 4
If the taskbar doesn't disappear, it may help to change the Window visibility before and after changing window style, like this:
private void MainWindow_StateChanged(object sender, EventArgs e) {
if (this.WindowState == WindowState.Maximized) {
// hide the window before changing window style
this.Visibility = Visibility.Collapsed;
this.Topmost = true;
this.WindowStyle = WindowStyle.None;
this.ResizeMode = ResizeMode.NoResize;
// re-show the window after changing style
this.Visibility = Visibility.Visible;
}
else {
this.Topmost = false;
this.WindowStyle = WindowStyle.SingleBorderWindow;
this.ResizeMode = ResizeMode.CanResize;
}
}
Solution 5
You just need to set the WindowStyle to none:
<Window ...
WindowStyle="None">
Related videos on Youtube
Author by
Sowvik Roy
Updated on July 05, 2022Comments
-
Sowvik Roy almost 2 years
I would like to make my application such that it can maximize to full screen means it hide the windows task bar and the title bar as well. And it should triggered by a button.
I am trying to develop the my application window like this.
Add my code snippet below
<controls:MetroWindow x:Class="EDUI.MainWindow" xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:EDiscoveryCore;assembly=EDiscoveryCore" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="eDi" BorderBrush="SkyBlue" BorderThickness="2" Height="999" Width="1071" WindowState="Maximized" x:Name="MainWindows">
-
user1069816 almost 9 yearsTo use IgnoreTaskbarOnMaximize you need to be using MahApps, see mahapps.com
-
Ian GM almost 7 yearsResizeMode="NoResize" was the missing piece for me with Windows 10 WPF. Thank you @Narek
-
T James almost 7 yearsWorked for me also. Thank you!
-
Milan Kocic over 6 yearsThis also was solution for WPF on windows 10. Without that it works fine on win 7 but not on win 8 and win 10. I am using WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize"
-
lindexi almost 6 yearsShowInTaskbar="False"
-
Nicolas over 5 yearsI already had
WindowStyle=None
andWindowState=Maximized
(in this order!) which worked in Windows 7 and Windows 8.1 without a problem. But as soon as my application opened a dialog window, the taskbar appeared topmost on Windows 10 - and it didn't went away, except when switching to a different window and back to my application.ResizeMode=NoResize
solved this! -
komodosp about 5 yearsIs
ShowTitleBar
a real property? It's giving me an error, and apparently the correct way of hiding the title bar isWindowStyle="None"
-
krobelusmeetsyndra about 4 yearsThat did it for me. Thanks a lot!!