protected override void OnDetached()
        {
            var renderer = Container as IVisualElementRenderer;

            // Check disposed
            if (renderer?.Element != null)
            {
                _clickOverlay.Click     -= ViewOnClick;
                _clickOverlay.LongClick -= ViewOnLongClick;

                ViewOverlayCollector.Delete(Container, this);
            }
        }
Example #2
0
        protected override void OnDetached()
        {
            var renderer = Container as IVisualElementRenderer;

            if (renderer?.Element != null) // Check disposed
            {
                if (_viewOverlay != null)
                {
                    _viewOverlay.Touch -= OnTouch;
                }

                ViewOverlayCollector.Delete(Container, this);

                if (EnableRipple)
                {
                    RemoveRipple();
                }
            }
        }