Click here to Skip to main content
Click here to Skip to main content

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

, 28 Feb 2011
Rate this:
Please Sign up or sign in to vote.
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 Smile | :) : 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jmix90
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 :
Follow on   Twitter

Comments and Discussions

 
QuestionExcellent! Pinmembersea_cumber25-Feb-13 22:05 
QuestionMany thanks PinmemberRobba10-Jan-13 4:12 
GeneralEdited title and description, added code formatting. PinsubeditorIndivara28-Feb-11 13:37 

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 28 Feb 2011
Article Copyright 2010 by jmix90
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid