示例#1
0
        public override void OnTouchDown(TouchDownEvent touchEventArgs)
        {
            var isInArea = IsInArea(touchEventArgs.LocationX, touchEventArgs.LocationY);

            base.OnTouchDown(touchEventArgs);
            // Only start handling touch if it happened inside control's area
            if (!touchEventArgs.IsPrimaryContact || !isInArea)
            {
                return;
            }

            _lastTouchEvent = touchEventArgs;
            IScrollViewerFocusSupport svfs = FindScrollControl() as IScrollViewerFocusSupport;

            if (svfs != null)
            {
                svfs.BeginScroll();
            }
        }
示例#2
0
        public bool BeginScroll()
        {
            IScrollViewerFocusSupport svfs = _itemsHostPanel as IScrollViewerFocusSupport;

            return(svfs != null && svfs.BeginScroll());
        }