Is it possible to remove the white strip on top of WPF window with Window Style=None. XAML and Window is shown in the screenshot:
What you are seeing in white is the re-size border. You can remove that and still make the window resizable by setting ResizeMode="CanResizeWithGrip" AllowsTransparency="True"
If you dont want to resize at all then do this - ResizeMode="NoResize"
, again you wont see the border but you cant resize.
<Window x:Class="HandsOnSolution.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" Background="Green" WindowStyle="None" ResizeMode="CanResizeWithGrip" AllowsTransparency="True"> <Grid> </Grid> </Window>
Edit
Good point by @devuxer, if you are interested in dragging you can add this piece of code to the window mouse down event
<Window MouseLeftButtonDown="Window_MouseLeftButtonDown"/> //code behind private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { DragMove(); }
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