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