Creating a full-screen window in WPF is quite simple, you just have to set
WindowState
to
Maximized
and
WindowStyle
to
None
.
But in my current project, I was facing a little drawback: a border was still visible on the bottom and on the right side of my window.
An image example can be seen here:
Image example[
^]
I have seen some solution on the web talking about Win32 interop and
WM_GETMINMAXINFO
messages, but is quite simplier :) : just set the
ResizeMode
attribute of your Window to
NoResize
.
You will then end up with this windows:
<Window x:Class="lexiqueDuNet.com.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" >
</Window>
PS : You can read this tip on my blog[^] too.