Why same thickness Lines in Grid show different thickness?

丶灬走出姿态 提交于 2020-07-22 21:37:32

问题


I have a problem with line's thickness,And I can't figure out what's the reason. I have a stackPanel in which I put in 2 Grid.In each grid,I have two line with same thickness. Code is Here:

 <StackPanel Width="300" Margin="10" Height="200" VerticalAlignment="Top" Background="LightGray">
        <Grid>
            <Line X1="0" Y1="0" X2="200" Y2="0" Stroke="Red" StrokeThickness="1"/>
            <Line X1="0" Y1="24" X2="200" Y2="24" Stroke="Red" StrokeThickness="1"/>
        </Grid>
        <Grid>
            <Line X1="0" Y1="0" X2="200" Y2="0" Stroke="Red" StrokeThickness="1"/>
            <Line X1="0" Y1="24" X2="200" Y2="24" Stroke="Red" StrokeThickness="1"/>
        </Grid>
    </StackPanel>

and when I run the app, I found weird things like this: I'm wondering why the lines show different thickness.

来源:https://stackoverflow.com/questions/55338765/why-same-thickness-lines-in-grid-show-different-thickness

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!