title: c# wpf 2d graphics - Looking for tutorial / examples
body: <p>Could you please point me to a good C# tutorial for drawing 2d graphics like Ellipse and Rectangle (that inherit from Shape) on a Canvas using WPF ?
  I'm also interested later to click on shapes and identify which shape was clicked, and also to drag and drop shapes on the canvas.
  Thank you !</p>
  
  <hr>
  
  <p>Thank you for the links.
  Could you please tell me what kind of project should I start in Visual Studio in order to compile and run this program (taken from <a href="http://msdn.microsoft.com/en-us/library/ms747393.aspx" rel="nofollow noreferrer">Shapes and Basic Drawing in WPF</a>):</p>
  
  <pre><code>using System;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Media;
  using System.Windows.Shapes;
  
  namespace SDKSample
  {
      public partial class SetBackgroundColorOfShapeExample : Page
      {
          public SetBackgroundColorOfShapeExample()
          {
              // Create a StackPanel to contain the shape.
              StackPanel myStackPanel = new StackPanel();
  
              // Create a red Ellipse.
              Ellipse myEllipse = new Ellipse();
  
              // Create a SolidColorBrush with a red color to fill the 
              // Ellipse with.
              SolidColorBrush mySolidColorBrush = new SolidColorBrush();
  
              // Describes the brush's color using RGB values. 
              // Each value has a range of 0-255.
              mySolidColorBrush.Color = Color.FromArgb(255, 255, 255, 0);
              myEllipse.Fill = mySolidColorBrush;
              myEllipse.StrokeThickness = 2;
              myEllipse.Stroke = Brushes.Black;
  
              // Set the width and height of the Ellipse.
              myEllipse.Width = 200;
              myEllipse.Height = 100;
  
              // Add the Ellipse to the StackPanel.
              myStackPanel.Children.Add(myEllipse);
  
              this.Content = myStackPanel;
          }
  
      }
  }
  </code></pre>