title: How do I draw polygon?( in C# WPF project)
body: <p>Click the points, I want to make from the polygon area on image.</p>
  
  <pre><code>myPolygon = new Polygon();
  myPolygon.Stroke = Brushes.Black; 
  myPolygon.Fill = Brushes.LightYellow; 
  myPolygon.StrokeThickness = 2; 
  myPolygon.HorizontalAlignment = HorizontalAlignment.Left; 
  myPolygon.VerticalAlignment = VerticalAlignment.Center; 
  myPolygon.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(Polygon_MouseDown); 
  myPolygon.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(Polygon_MouseUp);     
  
  private void Polygon_MouseDown(object sender, MouseButtonEventArgs e) 
  {     
      Point p = e.GetPosition(image); 
      myPolygon.Points = new PointCollection() { new Point(p.X,p.Y) };
      RootCanvas.Children.Add(myPolygon); 
  } //MouseClick Event BUT, did not click behavior.. I want draw a line along the points.
  </code></pre>
  
  <p>How can I do...?</p>