C# WPF farklı boyut IDE'den mi?
ben Blend/VS2012 IDE
ve Debugging
farklı görünümü ile sorun yaşıyorum. IDE
'da, Rectangle
merkezde bulunur, ancak derlendiğinde veya hata ayıklandığında, kenar boşluğunun boyutu farklıdır. Benim görüşüme göre, bu pencere kenarlığının boyutu farklı olduğu için oluşur. Bu sorunu gerçekten çözmek istiyorum. Baska öneri?
Teşekkür ederiz.
<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>
Sonuç aynıdır:
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>
XAML
kodu Düzenlendi. Bilgisayarımın bu sorunu mu?
Xaml kodunu sağlayabilir misiniz? – Xelom
Xelom, xaml kodunu ekledim. İlginiz için teşekkür ederim. – jn4kim
Marging = "10" ile marging değerini değiştirin ve Horizontal ve VerticalAlignment'i Stretch veya Center'a ayarlayın. –