Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Remove border from right and bottom of WPF full-screen window

0.00/5 (No votes)
28 Feb 2011 1  
Creating a full-screen window in WPF is quite simple, set WindowState to Maximized and WindowStyle to None. However, a border is still visible on the bottom and on the right sides. In this post we'll discover how to remove it.
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:
XML
<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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here