public bool IsSwipeLeft(GestureEventArgs args)
 {
     var interpreter = args.Interpreter;
     if (interpreter == null)
     {
         return false;
     }
     var gesture = args.Gesture;
     if (IsCommand(gesture, NavigationCommands.BrowseForward))
     {
         return true;
     }
     return interpreter.IsSwipeLeft(gesture);
 }
Exemplo n.º 2
0
        protected virtual void OnGesture(object sender, GestureEventArgs e)
        {
            if (GestureTracker == null || GestureTracker.Interpreter == null)
            {
                return;
            }
            var gesture = GestureType.Unknown;
            if (GestureTracker.Interpreter.IsSwipeRight(e))
            {
                gesture = GestureType.SwipeRight;
            }
            if (GestureTracker.Interpreter.IsSwipeLeft(e))
            {
                gesture = GestureType.SwipeLeft;
            }

            RaiseEvent(new GesturedEventArgs(gesture, e));
        }
 public GesturedEventArgs(GestureType gesture, GestureEventArgs gestureEventArgs)
     : base(GesturePanel.GesturedEvent)
 {
     Gesture = gesture;
     GestureEventArgs = gestureEventArgs;
 }
 private void OnSubfinderGestured(object sender, GestureEventArgs e)
 {
     var handler = Gestured;
     if (handler != null)
     {
         handler(this, new GestureEventArgs(this, e));
     }
 }
 public GestureEventArgs(IGestureTracker tracker, GestureEventArgs args)
 {
     _gestureTrackers.AddRange(args.GestureTrackers);
     _gestureTrackers.Add(tracker);
     Gesture = args.Gesture;
 }