Windows Phone 8.1 Rectangle

network | | 访问(51)
<StackPanel >
    <!--蓝边填充红色的矩形-->
    <Rectangle Width="347" Height="80" Fill="Red" Stroke="Blue" StrokeThickness="3">
    </Rectangle>
    <!--使用LinearGradientBrush画刷填充的圆角矩形-->
    <Rectangle Width="347" Height="100" Stroke="#000000" StrokeThickness="2" RadiusX="15" RadiusY="15">
        <Rectangle.Fill>
            <LinearGradientBrush StartPoint="0,1">
                <GradientStop Color="#FFFFFF" Offset="0.0" />
                <GradientStop Color="#FF9900" Offset="1.0" />
            </LinearGradientBrush>
        </Rectangle.Fill>
    </Rectangle>
    <!--使用RadialGradientBrush画刷的矩形-->
    <Rectangle Width="347" Height="100">
        <Rectangle.Fill>
            <LinearGradientBrush>
                <GradientStop Color="#0099FF" Offset="0" />
                <GradientStop Color="#FF0000" Offset="0.25" />
                <GradientStop Color="#FCF903" Offset="0.75" />
                <GradientStop Color="#3E9B01" Offset="1" />
            </LinearGradientBrush>
        </Rectangle.Fill>
    </Rectangle>
</StackPanel>