Пример #1
0
 private PointerRoutedEventArgs GetPointerEventArgs(MotionEvent ev, int pointerIndex)
 {
     return(new PointerRoutedEventArgs(ev)
     {
         OriginalSource = this,
         Pointer = ev.GetPointer(pointerIndex)
     });
 }
Пример #2
0
 private PointerRoutedEventArgs GetPointerEventArgs(MotionEvent ev, int pointerIndex)
 {
     return(new PointerRoutedEventArgs(ev)
     {
         OriginalSource = _target,
         Pointer = ev.GetPointer(pointerIndex),
         CanBubbleNatively = true
     });
 }
Пример #3
0
        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);
            }
        }
Пример #4
0
        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);
            }
        }