Exemplo n.º 1
0
 protected override void OnAttached()
 {
     _effect         = Element.GetTouchEff();
     _effect.Control = Element as VisualElement;
     _effect.ForceUpdateState(false);
     if (Container != null)
     {
         _gesture = new TouchNSClickGestureRecognizer(_effect, Container);
         Container.AddGestureRecognizer(_gesture);
         Container.AddSubview(_mouseTrackingView = new MouseTrackingView(_effect));
     }
 }
Exemplo n.º 2
0
 protected override void OnDetached()
 {
     _mouseTrackingView?.RemoveFromSuperview();
     _mouseTrackingView?.Dispose();
     _mouseTrackingView = null;
     _effect.Control    = null;
     _effect            = null;
     if (_gesture != null)
     {
         Container?.RemoveGestureRecognizer(_gesture);
     }
     _gesture?.Dispose();
     _gesture = null;
 }
Exemplo n.º 3
0
        protected override void OnAttached()
        {
            _effect = Element.PickTouchEff();
            if (_effect?.IsDisabled ?? true)
            {
                return;
            }

            _effect.Control = Element as VisualElement;

            if (Container != null)
            {
                _gesture = new TouchNSClickGestureRecognizer(_effect, Container);
                Container.AddGestureRecognizer(_gesture);
                Container.AddSubview(_mouseTrackingView = new MouseTrackingView(_effect));
            }
        }