/// <summary> /// Called by the framework when the mouse button is released. /// </summary> /// <remarks> /// <para> /// The <see cref="ControlGraphic"/> implementation calls <see cref="IMouseButtonHandler.Stop"/> on /// the current handler, <see cref="Stop"/>, or any child graphics implementing <see cref="IMouseButtonHandler"/>, /// in decreasing order of priority. /// </para> /// </remarks> /// <param name="mouseInformation">The mouse input information.</param> /// <returns>True if the framework should <b>not</b> release capture; False otherwise.</returns> bool IMouseButtonHandler.Stop(IMouseInformation mouseInformation) { bool result; if (_capturedHandler != null) { result = _capturedHandler.Stop(mouseInformation); if (!result) { _capturedHandler = null; return(result); } } try { result = this.Stop(mouseInformation); } finally { _isTracking = false; _lastTrackedPosition = PointF.Empty; } return(result); }
private bool StopHandler(IMouseButtonHandler handler) { bool handled = handler.Stop(this); if (!handled) { _startCount = 0; } return(handled); }
public bool Stop(IMouseInformation mouseInformation) { bool result = false; if (_capturedHandler != null) { result = _capturedHandler.Stop(mouseInformation); if (!result) { _capturedHandler = null; return(false); } } return(result); }
private bool StopHandler(IMouseButtonHandler handler) { bool handled = handler.Stop(this); if (!handled) _startCount = 0; return handled; }