private PointerRoutedEventArgs GetPointerEventArgs(MotionEvent ev, int pointerIndex) { return(new PointerRoutedEventArgs(ev) { OriginalSource = this, Pointer = ev.GetPointer(pointerIndex) }); }
private PointerRoutedEventArgs GetPointerEventArgs(MotionEvent ev, int pointerIndex) { return(new PointerRoutedEventArgs(ev) { OriginalSource = _target, Pointer = ev.GetPointer(pointerIndex), CanBubbleNatively = true }); }
protected override bool OnSingleTap(MotionEvent e) { try { var pointer = e.GetPointer(0); var args = new TappedRoutedEventArgs(new Point(e.GetX(), e.GetY())) { OriginalSource = _target, PointerDeviceType = pointer.PointerDeviceType, CanBubbleNatively = true }; return(_target.RaiseEvent(UIElement.TappedEvent, args)); } catch (Exception ex) { Windows.UI.Xaml.Application.Current.RaiseRecoverableUnhandledExceptionOrLog(ex, this); return(false); } }
protected override bool OnSingleTap(MotionEvent e) { try { var pointer = e.GetPointer(0); var args = new TappedRoutedEventArgs(new Point(e.GetX(), e.GetY())) { OriginalSource = this, PointerDeviceType = pointer.PointerDeviceType }; Tapped?.Invoke(Target, args); return(args.Handled); } catch (Exception ex) { Windows.UI.Xaml.Application.Current.RaiseRecoverableUnhandledExceptionOrLog(ex, this); return(false); } }