void CalculateLeftRight(Point current, bool isInertial) { if (isInertial && !_isSwiped) { var swipedDistance = current.X; if (Math.Abs(swipedDistance) <= MAX_SWIPE_DISTANCE) { return; } if (swipedDistance > 0) { RightSwipe?.Invoke(this, EventArgs.Empty); } else { LeftSwipe?.Invoke(this, EventArgs.Empty); } _isSwiped = true; } }
public void OnLeftSwipe(object sender, EventArgs e) { LeftSwipe?.Invoke(this, e); }