Polygon Mouse down event : Polygon « Windows Presentation Foundation « VB.Net Tutorial






<Window x:Class="WpfApplication1.ShapesWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ShapesWindow" Height="160" Width="400">
    <StackPanel Orientation="Horizontal">
        <Polygon Fill="Red" Canvas.Left = "100" Canvas.Top="30" Points="20 0 40 40 0 40" MouseDown="Polygon_MouseDown"/>
    </StackPanel>
</Window>


//File:Window.xaml.vb

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes

Namespace WpfApplication1
  Public Partial Class ShapesWindow
    Inherits Window
    Public Sub New()
      InitializeComponent()
    End Sub

    Private Sub Polygon_MouseDown(sender As Object, e As MouseButtonEventArgs)
      MessageBox.Show("Hi")
    End Sub
  End Class
End Namespace
WPF Polygon Mouse Down Event








16.71.Polygon
16.71.1.Setting Points for PolygonSetting Points for Polygon
16.71.2.FillRule='Nonzero' for PolygonFillRule='Nonzero' for Polygon
16.71.3.A PolygonA Polygon
16.71.4.Polygon FillRule=NonzeroPolygon FillRule=Nonzero
16.71.5.FillRule=NonzeroFillRule=Nonzero
16.71.6.FillRule=EvenOddFillRule=EvenOdd
16.71.7.Draws a triangle with a blue interiorDraws a triangle with a blue interior
16.71.8.Draws a triangle with a blue interior and a black outlineDraws a triangle with a blue interior and a black outline
16.71.9.A triangle with a black outline.A triangle with a black outline.
16.71.10.Set Stroke, StrokeThickness for PolygonSet Stroke, StrokeThickness for Polygon
16.71.11.Draws polygon with LinearGradientBrushDraws polygon with LinearGradientBrush
16.71.12.Shows a line that crosses more than one other lineShows a line that crosses more than one other line
16.71.13.Polygon Mouse down eventPolygon Mouse down event