Windows Phone 8.1 Line

network | | 访问(32)
<StackPanel>
    <!--创建一条红色的线-->
    <Line X1="50" Y1="75" X2="250" Y2="75" Stroke="Red" StrokeThickness="10" ></Line>
    <!--创建一条红色的虚线-->
    <Line X1="50" Y1="75" X2="250" Y2="75" Stroke="Red" StrokeThickness="10" StrokeDashArray="2" StrokeDashCap="Round" ></Line>
    <!--创建一条颜色渐变的线-->
    <Line X1="50" Y1="75" X2="250" Y2="75" StrokeThickness="10">
        <Line.Stroke>
            <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                <GradientStop Color="Red" Offset="0" />
                <GradientStop Color="Yellow" Offset="0.25" />
                <GradientStop Color="Green" Offset="0.5" />
                <GradientStop Color="Blue" Offset="0.75" />
                <GradientStop Color="Purple" Offset="1" />
            </LinearGradientBrush>
        </Line.Stroke>
    </Line>
</StackPanel>