OnMouseUp
(
MouseButtonEventArgs e
)
{
AssertValid();
// Restore the default cursor and release the mouse capture.
this.Cursor = null;
Mouse.Capture(null);
// Do nothing if the drawing isn't in a stable state.
if (this.IsLayingOutGraph)
{
return;
}
// Check whether the user clicked on a vertex.
Point oMouseLocation = e.GetPosition(this);
IVertex oClickedVertex;
TryGetVertexFromPoint(oMouseLocation, out oClickedVertex);
FireGraphMouseUp(e, oClickedVertex);
// If it was the right button that was released, do nothing else.
if (e.LeftButton == MouseButtonState.Released)
{
// Check for a mouse drag that might be in progress.
CheckForVertexDragOnMouseUp(e);
CheckForMarqueeDragOnMouseUp(e);
CheckForTranslationDragOnMouseUp(e);
}
}