Draws polygon with LinearGradientBrush : Polygon « Windows Presentation Foundation « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Windows Presentation Foundation » PolygonScreenshots 
Draws polygon with LinearGradientBrush
Draws polygon with LinearGradientBrush
     

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Fun with Graphics!" Height="345" Width="452">

  <Canvas>

    <Polygon Points="150,150 400,125 350,275 250,200" Stroke="Purple" StrokeThickness="3">
      <Polygon.Fill>
        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="Red" Offset="0" />
            <GradientStop Color="Yellow" Offset="0.25" />
            <GradientStop Color="Honeydew" Offset="0.75" />
            <GradientStop Color ="Red" Offset="1" />
        </LinearGradientBrush>
      </Polygon.Fill>
    </Polygon>

  </Canvas>


</Window>

   
    
    
    
    
  
Related examples in the same category
1.Setting Points for PolygonSetting Points for Polygon
2.FillRule="Nonzero" for PolygonFillRule=
3.A PolygonA Polygon
4.Polygon FillRule=NonzeroPolygon FillRule=Nonzero
5.FillRule=NonzeroFillRule=Nonzero
6.FillRule=EvenOddFillRule=EvenOdd
7.Draws a triangle with a blue interiorDraws a triangle with a blue interior
8.Draws a triangle with a blue interior and a black outlineDraws a triangle with a blue interior and a black outline
9.A triangle with a black outline.A triangle with a black outline.
10.Set Stroke, StrokeThickness for PolygonSet Stroke, StrokeThickness for Polygon
11.Shows a line that crosses more than one other lineShows a line that crosses more than one other line
12.Polygon Mouse down eventPolygon Mouse down event
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.