Polygon Mouse down event : Polygon « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » PolygonScreenshots 
Polygon Mouse down event
Polygon Mouse down event
  
<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.cs

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

namespace WpfApplication1
{
    public partial class ShapesWindow : Window
    {
        public ShapesWindow()
        {
            InitializeComponent();
        }

        private void Polygon_MouseDown(object sender, MouseButtonEventArgs e)
        {
            MessageBox.Show("Hi");
        }
    }
}

   
    
  
Related examples in the same category
1.Polyline by PointsPolyline by Points
2.A Polygon always closes the end pointsA Polygon always closes the end points
3.Specifying points the long way with Polygon.Points tag and PointSpecifying points the long way with Polygon.Points tag and Point
4.Draw figure with "EvenOdd" FillRuleDraw figure with
5.Draw figure with "NonZero" FillRule
6.Draw second figure with "NonZero" FillRuleDraw second figure with
7.Polygon Stretch= UniformToFillPolygon Stretch= UniformToFill
8.Polygon Stretch="UniformPolygon Stretch=
9.Star PolygonStar Polygon
10.Fill Polygon with RadialGradientBrushFill Polygon with RadialGradientBrush
11.Polygon with FillPolygon with Fill
12.Polygon Stroke color and ThicknessPolygon Stroke color and Thickness
13.Polygon Along with CanvasPolygon Along with Canvas
14.Polygon Stretch=FillPolygon Stretch=Fill
15.Polygon Stretch=NonePolygon Stretch=None
16.Star.xamlStar.xaml
17.Difference between EvenOdd FillRule and NonZero FillRule
18.Draws another triangle with a blue interior with PolygonDraws another triangle with a blue interior with Polygon
19.Non-zero fill rule with more complex shape with PolygonNon-zero fill rule with more complex shape with Polygon
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.