你不会在父标签中  把整个 Window 或者Page或者UserControl 的 SnapsToDevicePixels 设置成true;

解决方案 »

  1.   

    把整个Window 的SnapsToDevicePixels 设置成true,里面的所有子元素的SnapsToDevicePixels 都为true了吗?
      

  2.   

    把整个Window 的SnapsToDevicePixels 设置成true,里面的所有子元素的SnapsToDevicePixels 都为true了吗?
    猜的。
      

  3.   

    把整个Window 的SnapsToDevicePixels 设置成true,里面的所有子元素的SnapsToDevicePixels 都为true了吗?
    就是这样,SnapsToDevicePixels在未明确设置的情况下会继承父元素的值
      

  4.   

    <Grid SnapsToDevicePixels="True">
            <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="27,42,0,0" Name="button1" VerticalAlignment="Top" Width="75" />
            <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="27,82,0,0" Name="button2" VerticalAlignment="Top" Width="75" />
        </Grid>
    把所有的控件都放在<Grid></Grid>中,那控件就会继承Grid的属性