title: How to use WindowChrome without Windows Aero glass effects in wpf, black border
body: <p>I'm trying to customize a window border by using the WindowChrome class. Without Windows Aero glass effects. As expected I end up with a black boarder.
  But i also end up without caption buttons</p>
  
  <p>From Microsoft i learn that i can use the standard window by setting the window style to null to overcome these problem
  <a href="http://msdn.microsoft.com/en-us/library/microsoft.windows.shell.windowchrome.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/microsoft.windows.shell.windowchrome.aspx</a></p>
  
  <p>But i do not succeed with that.</p>
  
  <p>Do anyone have a working example of this? Or a link of some sort that can explain how to solve my problem?</p>
  
  <p>I have tried to do a simple example code, and change the WindowStyle to none but it wont work. This is my example code:</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.Window1"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
          xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Microsoft.Windows.Shell" Title="Window" Height="400" Width="500"&gt;
      &lt;Window.Style&gt;
          &lt;Style TargetType="{x:Type Window}"&gt;
              &lt;Setter Property="shell:WindowChrome.WindowChrome"&gt;
                  &lt;Setter.Value&gt;
                      &lt;shell:WindowChrome /&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type Window}"&gt;
                          &lt;Grid&gt;
                              &lt;Border Background="White" Margin="{Binding Source={x:Static shell:SystemParameters2.Current}, Path=WindowNonClientFrameThickness}"&gt;
                                  &lt;ContentPresenter Content="{TemplateBinding Content}" /&gt;
                              &lt;/Border&gt;
                              &lt;TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" 
                                 VerticalAlignment="Top" HorizontalAlignment="Left" 
                                 Margin="36,8,0,0"/&gt;
                              &lt;Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Icon}"
                             VerticalAlignment="Top" HorizontalAlignment="Left"
                             Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(shell:WindowChrome.WindowChrome).ResizeBorderThickness}" 
                             Width="{Binding Source={x:Static shell:SystemParameters2.Current}, Path=SmallIconSize.Width}"
                             shell:WindowChrome.IsHitTestVisibleInChrome="True"/&gt;
                          &lt;/Grid&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/Window.Style&gt;
      &lt;Grid/&gt;
  &lt;/Window&gt;
  </code></pre>