Example #1
0
        public TouchRecognizer(Element element, UIView view, DragDrop.View.MyEffect.TouchEffect touchEffect)
        {
            this.element     = element;
            this.view        = view;
            this.touchEffect = touchEffect;

            viewDictionary.Add(view, this);
        }
Example #2
0
 /// <summary>
 /// イベントのアタッチ
 /// </summary>
 protected override void OnAttached()
 {
     view    = Control == null ? Container : Control;
     element = Element;
     if (view != null)
     {
         view.Touch += OnTouch;
         viewDictionary.Add(view, this);
         tEffect = (DragDrop.View.MyEffect.TouchEffect)element.Effects.FirstOrDefault(e => e is DragDrop.View.MyEffect.TouchEffect);
     }
 }
Example #3
0
        /// <summary>
        /// イベントのアタッチ
        /// </summary>
        protected override void OnAttached()
        {
            view = Control == null ? Container : Control;
            view.UserInteractionEnabled = true;

            DragDrop.View.MyEffect.TouchEffect effect = (DragDrop.View.MyEffect.TouchEffect)Element.Effects.FirstOrDefault(e => e is DragDrop.View.MyEffect.TouchEffect);

            if (effect != null && view != null)
            {
                touchRecognizer = new TouchRecognizer(Element, view, effect);

                view.AddGestureRecognizer(touchRecognizer);
            }
        }