protected override void OnMouseUp(MouseEventArgs e) { if (Capture) { var pos = ClientToLogicalPosition(e.Location); if (dragging) { cursorPos = anchorPos = pos; var span = GetSpan(e.Location); if (span != null && span.Tag != null) { Navigate.Fire(this, new EditorNavigationArgs(span.Tag)); } Invalidate(); } else { if (IsSelectionEmpty()) { var span = GetSpan(e.Location); if (span != null && span.Tag != null) { Navigate.Fire(this, new EditorNavigationArgs(span.Tag)); } } SelectionChanged.Fire(this); } Capture = false; } base.OnMouseUp(e); }
protected override void OnMouseUp(MouseEventArgs e) { if (Capture) { var span = GetSpan(e.Location); if (span != null && span.Tag != null) { Navigate.Fire(this, new EditorNavigationArgs(span.Tag)); } } base.OnMouseUp(e); }