title: C# WPF different size from IDE after debugging?
body: <p><img src="https://i.stack.imgur.com/E7DpJ.png" alt="http://i.stack.imgur.com/2gOLN.png"></p>
  
  <p>I am having a problem with different appearance in <code>Blend/VS2012 IDE</code> and in <code>Debugging</code>.
  In <code>IDE</code>, the <code>Rectangle</code> is at the center, but when it is compiled or debugged, the size of the margin is different. In my view, this occurs because the size of the window border is different. I really want to fix this problem. Any suggestions?</p>
  
  <p>Thank You.</p>
  
  <p><code>XAML</code></p>
  
  <pre><code>&lt;Window x:Class="WpfApplication2.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="202" Width="194"&gt;
  &lt;Grid HorizontalAlignment="Left" Height="171" VerticalAlignment="Top" Width="186"&gt;
      &lt;Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="151" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="166"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Edited <code>XAML</code> code:</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication2.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="202" Width="194"&gt;
  &lt;Grid HorizontalAlignment="Left" Height="171" VerticalAlignment="Top" Width="186"&gt;
      &lt;Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="151" Margin="10" Stroke="Black" VerticalAlignment="Center" Width="166"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>Result is the same. Is this problem of my PC?</p>