protected override void OnDetached() { var renderer = Container as IVisualElementRenderer; if (renderer?.Element != null) // Check disposed { _clickOverlay.Click -= ViewOnClick; _clickOverlay.LongClick -= ViewOnLongClick; ViewOverlayCollector.Delete(Container, this); } }
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(); } } }