/// <summary> /// Called before the PointerReleased event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnPointerReleased(PointerRoutedEventArgs e) { base.OnPointerReleased(e); if (e.Handled) { return; } if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse) { this.ReleasePointerCapture(e.Pointer); e.Handled = this.ActualController.HandleMouseUp(this, e.ToMouseEventArgs(this)); } else if (e.Pointer.PointerDeviceType == PointerDeviceType.Touch) { e.Handled = this.ActualController.HandleTouchCompleted(this, e.ToTouchEventArgs(this)); } }
/// <summary> /// Called before the PointerPressed event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnPointerPressed(PointerRoutedEventArgs e) { base.OnPointerPressed(e); if (e.Handled) { return; } if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse) { this.Focus(FocusState.Pointer); this.CapturePointer(e.Pointer); e.Handled = this.ActualController.HandleMouseDown(this, e.ToMouseDownEventArgs(this)); } else if (e.Pointer.PointerDeviceType == PointerDeviceType.Touch) { this.Focus(FocusState.Pointer); e.Handled = this.ActualController.HandleTouchStarted(this, e.ToTouchEventArgs(this)); } }
/// <summary> /// Called before the PointerReleased event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnPointerReleased(PointerRoutedEventArgs e) { base.OnPointerReleased(e); if (e.Handled) { return; } if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse) { this.ReleasePointerCapture(e.Pointer); e.Handled = this.ActualController.HandleMouseUp(this, e.ToMouseEventArgs(this)); } else if (e.Pointer.PointerDeviceType == PointerDeviceType.Touch) { e.Handled = this.ActualController.HandleTouchCompleted(this, e.ToTouchEventArgs(this)); } }
/// <summary> /// Called before the PointerPressed event occurs. /// </summary> /// <param name="e">Event data for the event.</param> protected override void OnPointerPressed(PointerRoutedEventArgs e) { base.OnPointerPressed(e); if (e.Handled) { return; } if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse) { this.Focus(FocusState.Pointer); this.CapturePointer(e.Pointer); e.Handled = this.ActualController.HandleMouseDown(this, e.ToMouseDownEventArgs(this)); } else if (e.Pointer.PointerDeviceType == PointerDeviceType.Touch) { this.Focus(FocusState.Pointer); e.Handled = this.ActualController.HandleTouchStarted(this, e.ToTouchEventArgs(this)); } }