protected override void Dispose(bool disposing)
        {
            GenericMotion -= HandleGenericMotion;
            Touch         -= HandleTouch;

            _listener = null;
            _detector?.Dispose();
            _detector = null;

            base.Dispose(disposing);
        }
        protected override void OnElementChanged(ElementChangedEventArgs <CustomView> e)
        {
            base.OnElementChanged(e);

            if (e.OldElement == null)
            {
                GenericMotion += HandleGenericMotion;
                Touch         += HandleTouch;

                _listener = new CustomViewListener(Element);
                _detector = new GestureDetector(_listener);
            }
        }