title: Adding an ellipse to mouse position?
body: <p>I am trying to add an ellipse to my grid from my mouse position. How can I define where the ellipse is drawn?</p>
  
  <p>here is my mouse down event:</p>
  
  <pre><code>private void GridCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  {
      _sensorPoint = Mouse.GetPosition(GridCanvas);
      AddSensor();
  }
  </code></pre>
  
  <p>And my AddSensor() method:</p>
  
  <pre><code>private void AddSensor()
  {
      Ellipse sensorEllipse = new Ellipse();
      SolidColorBrush solidColorBrush = new SolidColorBrush();
  
  
      solidColorBrush.Color = Color.FromArgb(0, 0, 0, 0);
      sensorEllipse.Fill = solidColorBrush;
      sensorEllipse.StrokeThickness = 2;
      sensorEllipse.Stroke = Brushes.Black;
      sensorEllipse.Width = 10;
      sensorEllipse.Height = 10;
  
      GridCanvas.Children.Add(sensorEllipse);
  }
  </code></pre>
  
  <p>How can I add sensorEllipse where the mouse is clicked on the canvas? </p>