WPF: Hide Built in Header Bar For an Open Window

Ok so this one is a simple one.  Well at least once you see it in action.  Say you want to get rid of the built in windows header bar:


You know, that thing. Well it’s crazy simple. And I mean crazy as in mind boggling, not crazy like dress up your cat in clothes crazy.

All you have to do is set these two properties:

AllowsTransparency="True" WindowStyle="None"

In the window tag at the top of the page. For example:

<Window x:Class="DesCombine.WPF.FileUpload"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="File Upload" Height="350" Width="525" BorderThickness="0" ResizeMode="NoResize"
  WindowStartupLocation="CenterScreen" AllowsTransparency="True" WindowStyle="None">

Only catch is that you have to now supply any useful buttons like Minimize or Close by yourself. But I never said that you wouldn’t. You thought that. You.