A PathGeometry : PathGeometry « Shapes « Silverlight






A PathGeometry

A PathGeometry
   
<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>

    <Grid x:Name="LayoutRoot" Background="White">
        <Canvas Width="100" Height="100" Background="Gray">
            <Path Stroke="Red" StrokeThickness="2">
                <Path.Data>
                    <PathGeometry>
                        <PathGeometry.Figures>
                            <PathFigure StartPoint="5,5">
                                <PathFigure.Segments>
                                    <ArcSegment Size="10,10" RotationAngle="30" Point="20,10" IsLargeArc="False" SweepDirection="Clockwise" />
                                    <BezierSegment Point1="40,0" Point2="60,60" Point3="75,90"/>
                                    <LineSegment Point="80,15" />
                                    <PolyLineSegment Points="50,90 3,7" />
                                    <QuadraticBezierSegment Point1="90,90" Point2="70,60"/>
                                </PathFigure.Segments>
                            </PathFigure>
                        </PathGeometry.Figures>
                    </PathGeometry>
                </Path.Data>
            </Path>
        </Canvas>

    </Grid>
</UserControl>

   
    
    
  








Related examples in the same category

1.Line with PathGeometryLine with PathGeometry