Пример #1
0
        protected override void OnElementChanged(ElementChangedEventArgs <Frame> e)
        {
            base.OnElementChanged(e);
            var extendedFrame = Element as ExtendedRouteDetailFrame;

            if (extendedFrame == null)
            {
                return;
            }

            if (extendedFrame.CurrentRoute == null)
            {
                return;
            }

            gestureRecognizer = new MyTapGesture()
            {
                ExtendedRouteDetailFrame = extendedFrame
            };
            gestureRecognizer.AddTarget(this, new ObjCRuntime.Selector("ResendTrigger:"));


            if (e.NewElement == null)
            {
                this.RemoveGestureRecognizer(gestureRecognizer);
            }
            if (e.OldElement == null)
            {
                this.AddGestureRecognizer(gestureRecognizer);
            }
        }
Пример #2
0
        private void LongPress(MyTapGesture myTapGesture)
        {
            //if (gestureRecognizer.State == UIGestureRecognizerState.Ended)
            //{

            //   (Element as ExtendedRouteDetailFrame).InvokeNormalPressedEvent((Element as ExtendedRouteDetailFrame));

            //}
        }