Wpf行无法正常显示

时间:2013-04-16 18:48:42

标签: wpf xaml user-interface

我正在尝试显示我在wpf中设计的多个UserControl但它们的行显示不正确

描述问题的图像: enter image description here

继承了用于绘制线条的xaml代码:

<Line Grid.Row="1" X1="30" Y1="20" X2="340" Y2="20" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="35" X2="340" Y2="35" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="50" X2="340" Y2="50" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="65" X2="340" Y2="65" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="80" X2="340" Y2="80" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="95" X2="340" Y2="95" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="30" Y1="110" X2="340" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>

    <Line Grid.Row="1" X1="30" Y1="10" X2="30" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="99" Y1="10" X2="99" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="177" Y1="10" X2="177" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="256" Y1="10" X2="256" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>
    <Line Grid.Row="1" X1="340" Y1="10" X2="340" Y2="110" Stroke="LightCyan" StrokeThickness="0.1"/>

它是一个简单的代码,我在这里找不到问题...

奇怪的是,当我调整窗口大小时,它有时会正确地显示该行。

0 个答案:

没有答案