C # WPF inny rozmiar od IDE po debugowaniu?

Mam problem z innym wyglądemBlend/VS2012 IDE i wDebugging. WIDE, theRectangle jest w centrum, ale gdy jest kompilowany lub debugowany, rozmiar marginesu jest inny. Moim zdaniem dzieje się tak, ponieważ rozmiar obramowania okna jest inny. Naprawdę chcę rozwiązać ten problem. Jakieś sugestie?

Dziękuję Ci.

XAML

<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">
<Grid HorizontalAlignment="Left" Height="171" VerticalAlignment="Top" Width="186">
    <Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="151" Margin="10,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="166"/>
</Grid>

EdytowaneXAML kod:

<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">
<Grid HorizontalAlignment="Left" Height="171" VerticalAlignment="Top" Width="186">
    <Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="151" Margin="10" Stroke="Black" VerticalAlignment="Center" Width="166"/>
</Grid>

Wynik jest taki sam. Czy to problem mojego komputera?

questionAnswers(1)

yourAnswerToTheQuestion