I've just switched over from WinForms to wpf and in WinForms removing the whole title box is very simple, just set the title="" and ControlBox=false.
Now there's many suggestions on how to do this with wpf, all of them using native Win32 calls. Although they do remove the control box, they still leave a thicker border at the top.
I'm certain it's doable using some kind of native call, but how?
Well, try this
WindowStyle="none"
like this:
<Window x:Class="Test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" WindowStyle="None"
MinHeight="350" MaxHeight="350" MinWidth="525" MaxWidth="525">
<Grid>
</Grid>
</Window>
Edit:
It looks a little stupid but this way (with Min- and MaxHeight/Width at the same size) you can prevent the window from beeing resized
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With