title: How do I go about implementing drag delta on shapes
body: <p>How do I go about implementing the drag delta on a Shape, I have the following code:</p>
  
  <pre><code>void Connector_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
      {
          if (e.ClickCount == 1)
          {
              this.Focus();
              this.CaptureMouse();
              this.RaiseEvent(new DragStartedEventArgs(0,0));
              initMousePoint = e.GetPosition(this);
          }
          e.Handled = true;
      }
      void Shape2_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
      {
          currMousePoint = e.GetPosition(this);
          if (this.IsMouseCaptured)
          {
                  this.RaiseEvent(new DragDeltaEventArgs(0,0);
          }
      }
      void Shape2_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
      {
          this.ReleaseMouseCapture();
      }
  </code></pre>
  
  <p>Now for the DragDeltaEvent args do I need to compute the drag in the mousemove and pass it to the event, also is this the right way to raise the event. If this works, then I should only subscribe to the drag delta event and use it as a thumb? Note, I do not want to template the thumb with the shape, providing this answer won't help me.</p>
  
  <hr>
  
  <p>note the chagnes, about the getting the position of the mouse, this I don't think works, because it gets the position relative to the element, not the containing panel, so I don't think i will be able to find the drag distance this way.</p>