Small ArcSegment

image_pdfimage_print


   
      
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">


<Canvas>
  <Ellipse Fill="Cyan" Stroke="Black" Width="140" Height="60" />
  <Path Fill="Cyan" Stroke="Black" Canvas.Left="180">
    <Path.Data>
      <PathGeometry>

        <PathFigure StartPoint="280,1" IsClosed="True">
          <ArcSegment Point="330,51" Size="70,30"
                      SweepDirection="Clockwise" IsLargeArc="False" />
        </PathFigure>

      </PathGeometry>
    </Path.Data>
  </Path>
</Canvas>


</Page>

   
    
    
    
    
    
     


Bezier Curve with BezierSegment

image_pdfimage_print


   
      
        
        
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <Path Stroke="Black">
          <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="0,50">
                  <BezierSegment Point1="60,50" Point2="100,0" Point3="100,50" />
                </PathFigure>
            </PathGeometry>
          </Path.Data>
        </Path>

</Page>

   
    
    
    
    
    
     


PolyBezierSegment Demo

image_pdfimage_print


   
      

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <Path Stroke="Black">
          <Path.Data>
            <PathGeometry>
        
                <PathFigure StartPoint="0,0">
                  <PolyBezierSegment>
                    <PolyBezierSegment.Points>
                      <Point X="10" Y="10"/>
                      <Point X="20" Y="120"/>
                      <Point X="40" Y="130"/>
                      <Point X="160" Y="1210"/>
                      <Point X="120" Y="315"/>
                      <Point X="100" Y="540"/>
                    </PolyBezierSegment.Points>
                  </PolyBezierSegment>
                </PathFigure>
        
            </PathGeometry>
          </Path.Data>
        </Path>

</Page>

   
    
    
    
    
    
     


Multiple geometries

image_pdfimage_print


   
      
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">


        <Path Fill="Cyan" Stroke="Black">
          <Path.Data>
            <GeometryGroup>
              <RectangleGeometry Rect="0,0,550,50" />
              <EllipseGeometry Center="500,250" RadiusX="30" RadiusY="10" />
            </GeometryGroup>
          </Path.Data>
        </Path>


</Page>

   
    
    
    
    
    
     


Combined geometries GeometryCombineMode=Exclude

image_pdfimage_print


   
      

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

        <Path Fill="Cyan" Stroke="Black">
          <Path.Data>  
            <CombinedGeometry GeometryCombineMode="Exclude">
              <CombinedGeometry.Geometry1>
                <RectangleGeometry Rect="0,0,50,50" />
              </CombinedGeometry.Geometry1>
              <CombinedGeometry.Geometry2>
                <EllipseGeometry Center="50,25" RadiusX="30" RadiusY="10" />
              </CombinedGeometry.Geometry2>
            </CombinedGeometry>
          </Path.Data>
        </Path>


</Page>

   
    
    
    
    
    
     


Path.Data with LineSegment

image_pdfimage_print


   
      

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

        <StackPanel Orientation="Horizontal">
          <StackPanel.Resources>
            <Style TargetType="Path">
              <Setter Property="Margin" Value="5" />
            </Style>
          </StackPanel.Resources>
        <Path Fill="Cyan" Stroke="Black">
          <Path.Data>
            <PathGeometry>
              <PathGeometry.Figures>
                <PathFigure StartPoint="0,0" IsClosed="True">
                  <LineSegment Point="50,0" />
                  <LineSegment Point="50,50" />
                  <LineSegment Point="0,50" />
                </PathFigure>
              </PathGeometry.Figures>
            </PathGeometry>
          </Path.Data>
        </Path>


        </StackPanel>

</Page>

   
    
    
    
    
    
     


Path Margin as resource

image_pdfimage_print


   
      

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

        <StackPanel Orientation="Horizontal">
          <StackPanel.Resources>
            <Style TargetType="Path">
              <Setter Property="Margin" Value="5" />
            </Style>
          </StackPanel.Resources>
        <Path Fill="Cyan" Stroke="Black">
          <Path.Data>
            <PathGeometry>
              <PathGeometry.Figures>
                <PathFigure StartPoint="0,0" IsClosed="True">
                  <LineSegment Point="50,0" />
                  <LineSegment Point="50,50" />
                  <LineSegment Point="0,50" />
                </PathFigure>
              </PathGeometry.Figures>
            </PathGeometry>
          </Path.Data>
        </Path>


        </StackPanel>

</Page>