/// <summary> /// Proceeds with dragging. /// </summary> /// <param name="e">The <see cref="T:System.Windows.Input.MouseEventArgs"/> that contains the event data.</param> public void OnMouseMove(MouseEventArgs e) { if (IsDragging && Movable) { Point newPoint = e.GetPosition(ExolutioCanvas); Vector delta = Vector.SubtractPoints(newPoint, PrevPoint); PrevPoint = newPoint; MousePoint = Vector.AddVector(MousePoint, delta); this.DragDelta(new DragDeltaEventArgs(delta.X, delta.Y)); } }
/// <summary> /// Ends dragging /// </summary> /// <param name="e">The <see cref="T:System.Windows.Input.MouseButtonEventArgs"/> that contains the event data. The event data reports that the mouse button was released.</param> public void OnMouseUp(MouseButtonEventArgs e) { #if SILVERLIGHT #else if (e.ChangedButton == MouseButton.Left) #endif { IsDragging = false; DraggedControl.ReleaseMouseCapture(); //e.Handled = true; DragCompleted(PrevPoint, Vector.SubtractPoints(PrevPoint, DragStartPoint)); } }