Polygon Stretch=Fill

image_pdfimage_print


   
     
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="Microsoft.Samples.Graphics.RectangleExample"
    WindowTitle="Rectangle Example">
  <Canvas>
     <Polygon Height="100" Width="50" Points="0,0 10,10 0,10" Fill="Blue" Stretch="Fill"/>
  </Canvas>
</Page>

   
    
    
    
    
     


Polygon Stretch=None

image_pdfimage_print


   
     
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="Microsoft.Samples.Graphics.RectangleExample"
    WindowTitle="Rectangle Example">
  <Canvas>
    <Polygon Height="100" Width="50" Points="0,0 10,10 0,10" Fill="Blue" Stretch="None"/>
  </Canvas>
</Page>

   
    
    
    
    
     


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>