Click here to Skip to main content
15,884,913 members
Articles / Desktop Programming / WPF
Tip/Trick

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

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
28 Feb 2011CPOL 29.2K   1   3
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer http://wpf-france.fr
France (Metropolitan) France (Metropolitan)
Jonathan creates software, mostly with C#,WPF and XAML.

He really likes to works on every Natural User Interfaces(NUI : multitouch, touchless, etc...) issues.



He is awarded Microsoft MVP in the "Client Application Development" section since 2011.


You can check out his WPF/C#/NUI/3D blog http://www.jonathanantoine.com.

He is also the creator of the WPF French community web site : http://wpf-france.fr.

Here is some videos of the projects he has already work on :

Comments and Discussions

 
QuestionExcellent! Pin
sea_cumber25-Feb-13 22:05
sea_cumber25-Feb-13 22:05 
QuestionMany thanks Pin
Robba10-Jan-13 4:12
Robba10-Jan-13 4:12 
GeneralEdited title and description, added code formatting. Pin
Indivara28-Feb-11 13:37
professionalIndivara28-Feb-11 13:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.