コード例 #1
0
ファイル: ScrollViewer.cs プロジェクト: davinx/MediaPortal-2
    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();
    }
コード例 #2
0
ファイル: UIElement.cs プロジェクト: aspik/MediaPortal-2
 public virtual void OnTouchLeave(TouchEvent touchEventArgs)
 {
   foreach (UIElement child in GetChildren())
   {
     if (!child.IsVisible) continue;
     child.OnTouchLeave(touchEventArgs);
   }
 }
コード例 #3
0
ファイル: ScrollViewer.cs プロジェクト: davinx/MediaPortal-2
    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();
    }