Polygon Stretch=Fill


   
     
<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>

   
    
    
    
    
     


Fill Polygon with RadialGradientBrush


   
     
<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="Example">
  <Canvas>

        <Polygon Name="hexagon"
          Stroke="Blue"
          StrokeThickness="2.0"
          Points="16,130 302,13 304,249 76,322 493,249 495,103">
          <Polygon.Fill>
            <RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
              <RadialGradientBrush.GradientStops>
                <GradientStop Color="Yellow" Offset="0" />
                <GradientStop Color="Gold" Offset="0.25" />
              </RadialGradientBrush.GradientStops>
            </RadialGradientBrush>
          </Polygon.Fill>
        </Polygon>
   
  </Canvas>
</Page>

   
    
    
    
    
     


Star Polygon


   
     

<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="Example">
  <Canvas>

        <Polygon Name="star" 
          Stroke="Blue" 
          Fill="DarkOrange" 
          StrokeThickness="2.0" 
          Points="176,50 189,15 186,113 200,17 26,240 189,198 176,34 163,198 66,240 151,17 66,113 163,155">
        </Polygon>

  </Canvas>
</Page>