Beispiel #1
0
    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();
    }
Beispiel #2
0
 public virtual void OnTouchLeave(TouchEvent touchEventArgs)
 {
   foreach (UIElement child in GetChildren())
   {
     if (!child.IsVisible) continue;
     child.OnTouchLeave(touchEventArgs);
   }
 }
Beispiel #3
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();
    }