protected override void Dispose(bool disposing)
 {
     RemoveGestureRecognizer(rightGesture);
     RemoveGestureRecognizer(leftGesture);
     leftGesture.Dispose();
     rightGesture.Dispose();
 }
 protected override void Dispose(bool disposing)
 {
     //Remove the Gesture Recognizers and dispose of them
     RemoveGestureRecognizer(rightGesture);
     RemoveGestureRecognizer(leftGesture);
     leftGesture.Dispose();
     rightGesture.Dispose();
 }
 private void Dispose(ref UISwipeGestureRecognizer gestureRecognizer)
 {
     if (gestureRecognizer != null)
     {
         RemoveGestureRecognizer(gestureRecognizer);
         gestureRecognizer.Dispose();
         gestureRecognizer = null;
     }
 }
Example #4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _leftSwipeGesture?.Dispose();
         _rightSwipeGesture?.Dispose();
         _upSwipeGesture?.Dispose();
         _downSwipeGesture?.Dispose();
     }
     base.Dispose(disposing);
 }
Example #5
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _leftSwipeGesture?.Dispose();
         _rightSwipeGesture?.Dispose();
         _upSwipeGesture?.Dispose();
         _downSwipeGesture?.Dispose();
         _panGestureRecognizer?.Dispose();
         _leftSwipeGesture     = null;
         _rightSwipeGesture    = null;
         _upSwipeGesture       = null;
         _downSwipeGesture     = null;
         _panGestureRecognizer = null;
     }
     base.Dispose(disposing);
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_swipeDown != null)
         {
             _swipeDown.Dispose();
             _swipeDown = null;
         }
         if (_swipeLeft != null)
         {
             _swipeLeft.Dispose();
             _swipeLeft = null;
         }
         if (_swipeRight != null)
         {
             _swipeRight.Dispose();
             _swipeRight = null;
         }
         if (_swipeUp != null)
         {
             _swipeUp.Dispose();
             _swipeUp = null;
         }
         if (_doubleTap != null)
         {
             _doubleTap.Dispose();
             _doubleTap = null;
         }
         if (_singleTap != null)
         {
             _singleTap.Dispose();
             _singleTap = null;
         }
         if (_pinch != null)
         {
             _pinch.Dispose();
             _pinch = null;
         }
     }
     // don't try and dispose the base - it will try and dispose of the native control that we didn't create
     //base.Dispose(disposing);
 }
        private void RemoveGestureRecognizer()
        {
            if (_longPressGestureRecognizer != null)
            {
                RemoveGestureRecognizer(_longPressGestureRecognizer);

                _longPressGestureRecognizer.Dispose();
                _longPressGestureRecognizer = null;
            }
            if (_pinchGestureRecognizer != null)
            {
                RemoveGestureRecognizer(_pinchGestureRecognizer);

                _pinchGestureRecognizer.Dispose();
                _pinchGestureRecognizer = null;
            }
            if (_panGestureRecognizer != null)
            {
                RemoveGestureRecognizer(_panGestureRecognizer);

                _panGestureRecognizer.Dispose();
                _panGestureRecognizer = null;
            }
            if (_swipeGestureRecognizer != null)
            {
                RemoveGestureRecognizer(_swipeGestureRecognizer);

                _swipeGestureRecognizer.Dispose();
                _swipeGestureRecognizer = null;
            }
            if (_rotationGestureRecognizer != null)
            {
                RemoveGestureRecognizer(_rotationGestureRecognizer);

                _rotationGestureRecognizer.Dispose();
                _rotationGestureRecognizer = null;
            }
        }
Example #8
0
        private void DisposeGestures()
        {
            if (_singleTapRecognizer != null)
            {
                ScrollView.RemoveGestureRecognizer(_singleTapRecognizer);
                _singleTapRecognizer.Dispose();
                _singleTapRecognizer = null;
            }

            if (_doubleTapRecognizer != null)
            {
                ScrollView.RemoveGestureRecognizer(_doubleTapRecognizer);
                _doubleTapRecognizer.Dispose();
                _doubleTapRecognizer = null;
            }

            if (_swipeRecognizer != null)
            {
                View.RemoveGestureRecognizer(_swipeRecognizer);
                _swipeRecognizer.Dispose();
                _swipeRecognizer = null;
            }
        }