public CarouselLayoutRenderer()
        {
            _pressedGestureRecognizer           = new UIPressedGestureRecognizer();
            _pressedGestureRecognizer.Pressed  += OnPressed;
            _pressedGestureRecognizer.Released += OnReleased;
            _pressedGestureRecognizer.Moved    += OnMoved;
            _pressedGestureRecognizer.ShouldRecognizeSimultaneously = ShouldRecognizeSimultaneously;

            AddGestureRecognizer(_pressedGestureRecognizer);
        }
Exemplo n.º 2
0
        protected override void OnElementChanged(ElementChangedEventArgs <FlyoutMenu> e)
        {
            base.OnElementChanged(e);

            _pressedGestureRecognizer           = new UIPressedGestureRecognizer();
            _pressedGestureRecognizer.Pressed  += OnPressed;
            _pressedGestureRecognizer.Released += OnReleased;
            _pressedGestureRecognizer.Canceled += OnCanceled;
            _pressedGestureRecognizer.Moved    += OnMoved;
            NativeView.AddGestureRecognizer(_pressedGestureRecognizer);
        }
Exemplo n.º 3
0
        protected override void OnAttached()
        {
            // Get the iOS UIView corresponding to the Element that the effect is attached to
            _view = Control == null ? Container : Control;

            // Get access to the TouchEffect class in the PCL
            _touchEffect = (XamKit.TouchEffect)Element.Effects.FirstOrDefault(e => e is XamKit.TouchEffect);

            if (_view != null)
            {
                _pressedGestureRecognizer           = new UIPressedGestureRecognizer();
                _pressedGestureRecognizer.Pressed  += OnPressed;
                _pressedGestureRecognizer.Released += OnReleased;
                _pressedGestureRecognizer.Canceled += OnCanceled;
                _pressedGestureRecognizer.Moved    += OnMoved;
                _view.AddGestureRecognizer(_pressedGestureRecognizer);
            }
        }