public override void OnTouchUp(TouchUpEvent touchEventArgs) { base.OnTouchUp(touchEventArgs); if (!touchEventArgs.IsPrimaryContact) return; _lastTouchEvent = null; IScrollViewerFocusSupport svfs = FindScrollControl() as IScrollViewerFocusSupport; if (svfs != null) svfs.EndScroll(); }
public virtual void OnTouchLeave(TouchEvent touchEventArgs) { foreach (UIElement child in GetChildren()) { if (!child.IsVisible) continue; child.OnTouchLeave(touchEventArgs); } }
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(); }