To make the window display without this gray border, you need to set the ‘ResizeMode’ property of the window to ’NoResize’.
[XAML]
<Window x:Class='BorderlessWindow.Window1'
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
Title='BorderlessWindow' Height='200' Width='200'
Background='White' WindowStyle='None' ResizeMode='NoResize'>
<Border Padding='5' BorderBrush='#feca00'
BorderThickness='3' Width='150' Height='150'>
<TextBlock>Learn WPF!</TextBlock>
</Border>
</Window>
Share with