How could I do this with wpf instead of windows forms?
You can do it by setting WindowChrome.
/* Set Borderless Chrome to this Window */
WindowChrome Resizable_BorderLess_Chrome = new WindowChrome();
Resizable_BorderLess_Chrome.GlassFrameThickness = new Thickness(0);
Resizable_BorderLess_Chrome.CornerRadius = new CornerRadius(0);
Resizable_BorderLess_Chrome.CaptionHeight = 5.0;
WindowChrome.SetWindowChrome(this, Resizable_BorderLess_Chrome);
Add the above code inside the window constructor to obtain border less resizable window. Or you could use the window style setter to set the window chrome property:
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome CornerRadius="0" GlassFrameThickness="1" UseAeroCaptionButtons="False"/>
</Setter.Value>
</Setter>
In addition to this you need to set ResizeMode to CanResize (or CanResizeWithGrip whatever that suits your purpose) and Window Style to None.
Refer MSDN link for more information
If you are looking for Metro UI like window please check this SO Question
Here is a sample in WPF. And another blog with a different sample.
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