title: AdornerDecorator for WPF Window changes offset of controls
body: <p>I have the following window definition</p>
  
  <pre><code>&lt;Window x:Class="MyWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Style="{StaticResource ShapedWindow}"
          Title="Title"&gt;
      &lt;Grid Name="grid1" /&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>with the following style and template definition</p>
  
  <pre><code>&lt;Style x:Key="ShapedWindow" TargetType="{x:Type Window}"&gt;
          &lt;Setter Property="AllowsTransparency" Value="True"&gt;&lt;/Setter&gt;
          &lt;Setter Property="WindowStyle" Value="None"&gt;&lt;/Setter&gt;
          &lt;Setter Property="Background" Value="Transparent"&gt;&lt;/Setter&gt;
          &lt;Setter Property="MinWidth" Value="300" /&gt;
          &lt;Setter Property="MinHeight" Value="300" /&gt;
          &lt;Setter Property="Template" Value="{StaticResource ShapedWindowTemplate}"&gt;&lt;/Setter&gt;
  &lt;/Style&gt;
  
  &lt;ControlTemplate x:Key="ShapedWindowTemplate" TargetType="{x:Type Window}"&gt;
      &lt;!--&lt;AdornerDecorator&gt;
          &lt;ContentPresenter /&gt;
      &lt;/AdornerDecorator&gt;--&gt;
  &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>which produces the following window in the designer</p>
  
  <p><img src="https://i.stack.imgur.com/MegVN.png" alt="Window before control template"></p>
  
  <p>When I remove the comments from the template definition the grid doesn't seem to be rendered in the same position? What am I missing here?</p>
  
  <p><img src="https://i.stack.imgur.com/TbGnx.png" alt="enter image description here"></p>