private void ViewPort_MouseUp(object sender, MouseButtonEventArgs e) { if (e.MiddleButton == MouseButtonState.Released) { moving = false; } if (ViewPort.Children.Contains(selectionRect)) { //determine nodes to add to selection DetermineSelection(); } ViewPort.ReleaseMouseCapture(); ViewPort.Children.Remove(selectionRect); }
private void ViewPort_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { ViewPort.ReleaseMouseCapture(); }