/// <summary> /// Handles the MouseUp event. /// </summary> /// <param name="e"></param> /// <returns></returns> public bool MouseUp(MouseEventArgs e) { if (IsActive) { SelectionManager.UnselectAll(); if (Canvas.IsMouseCaptured && !GhostManager.Rectangle.IsEmpty) { AddShape(GhostManager.Rectangle); } DeactivateTool(); GhostManager.Release(); return(true); } return(false); }
/// <summary> /// Handles the MouseUp event. /// </summary> /// <param name="e"></param> /// <returns></returns> public bool MouseUp(MouseEventArgs e) { if (IsActive) { SelectionManager.UnselectAll(); if (Canvas.IsMouseCaptured) { CreateConnectionCommand cmd = new CreateConnectionCommand(initialPoint, e.GetPosition(Canvas), Canvas); UndoManager.Execute(cmd); } DeactivateTool(); GhostManager.Release(); return(true); } return(false); }