/// <summary> /// Handles the mouse down event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="OxyPlot.OxyMouseEventArgs" /> instance containing the event data.</param> public virtual void HandleMouseDown(object sender, OxyMouseDownEventArgs e) { var args = new HitTestArguments(e.Position, MouseHitTolerance); foreach (var result in this.HitTest(args)) { e.HitTestResult = result; result.Element.OnMouseDown(e); if (e.Handled) { this.currentMouseEventElement = result.Element; return; } } if (!e.Handled) { this.OnMouseDown(sender, e); } }
/// <summary> /// Handles the touch started event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">A <see cref="OxyPlot.OxyTouchEventArgs" /> instance containing the event data.</param> public virtual void HandleTouchStarted(object sender, OxyTouchEventArgs e) { var args = new HitTestArguments(e.Position, MouseHitTolerance); foreach (var result in this.HitTest(args)) { result.Element.OnTouchStarted(e); if (e.Handled) { this.currentTouchEventElement = result.Element; return; } } if (!e.Handled) { this.OnTouchStarted(sender, e); } }
/// <summary> /// Handles the touch completed event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">A <see cref="OxyPlot.OxyTouchEventArgs" /> instance containing the event data.</param> public virtual void HandleTouchCompleted(object sender, OxyTouchEventArgs e) { if (this.currentTouchEventElement != null) { this.currentTouchEventElement.OnTouchCompleted(e); this.currentTouchEventElement = null; } if (!e.Handled) { this.OnTouchCompleted(sender, e); } }
/// <summary> /// Handles the mouse up event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="OxyPlot.OxyMouseEventArgs" /> instance containing the event data.</param> public virtual void HandleMouseUp(object sender, OxyMouseEventArgs e) { if (this.currentMouseEventElement != null) { this.currentMouseEventElement.OnMouseUp(e); this.currentMouseEventElement = null; } if (!e.Handled) { this.OnMouseUp(sender, e); } }