Multiple Line Segments

image_pdfimage_print


   
   

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Path Fill="Aqua" Stroke="Maroon" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="144 72">
                    <LineSegment Point="200 246" />
                    <LineSegment Point="53 138" />
                    <LineSegment Point="235 138" />
                    <LineSegment Point="88 246" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

   
    
    
     


Figure With Arcs

image_pdfimage_print
   
   

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Path Fill="Aqua" Stroke="Maroon" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="92 92">
                    <ArcSegment Point="92 88" Size="48 48" />
                    <LineSegment Point="80 88" />
                    <ArcSegment Point="40 192" Size="488 48" />
                    <LineSegment Point="400 192" />
                    <ArcSegment Point="88 92" Size="48 48" />
                    <LineSegment Point="192 192" />
                </PathFigure>
                <PathFigure StartPoint="336 200" IsClosed="True">
                    <ArcSegment Point="36 176" Size="12 12" />
                    <ArcSegment Point="336 200" Size="122 12" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

   
    
    
     


Counterclockwise (default), IsLargeArc

image_pdfimage_print


   
   
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <Path Stroke="Blue" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="144 144">
                    <ArcSegment Point="240 240" Size="144 96"
                                RotationAngle="45"
                                IsLargeArc="True" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>

</Canvas>

   
    
    
     


Clockwise, small arc (default)

image_pdfimage_print


   
   
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <Path Stroke="Green" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="144 144">
                    <ArcSegment Point="240 240" Size="144 96"
                                RotationAngle="45"
                                SweepDirection="ClockWise" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>

</Canvas>

   
    
    
     


Clockwise, IsLargeArc

image_pdfimage_print


   
   
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <Path Stroke="Purple" StrokeThickness="3">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="144 144">
                    <ArcSegment Point="240 240" Size="144 96"
                                RotationAngle="45"
                                SweepDirection="ClockWise"
                                IsLargeArc="True" />
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>

</Canvas>

   
    
    
     


Eclipse Sun

image_pdfimage_print


   
      

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Path Fill="Gray" Stroke="Black" StrokeThickness="3">
        <Path.Data>
            <GeometryGroup>
                <EllipseGeometry Center="96 300" RadiusX="48" RadiusY="48" />
                <EllipseGeometry Center="300 100" RadiusX="48" RadiusY="48">
                    <EllipseGeometry.Transform>
                        <RotateTransform x:Name="rotate"
                                         CenterX="300" CenterY="300" />
                    </EllipseGeometry.Transform>
                </EllipseGeometry>
            </GeometryGroup>
        </Path.Data>
    </Path>

    <Canvas.Triggers>
        <EventTrigger RoutedEvent="Canvas.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="rotate"
                                     Storyboard.TargetProperty="Angle"
                                     From="0" To="360" Duration="0:0:5"
                                     RepeatBehavior="Forever" />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Canvas.Triggers>
</Canvas>