Bladeren bron

fix pointer page scrolling issue

Emmanuel Hansen 2 jaren geleden
bovenliggende
commit
fa86c3259d

+ 1 - 0
samples/ControlCatalog/Pages/PointerCanvas.cs

@@ -74,6 +74,7 @@ public class PointerCanvas : Control
         public void HandleEvent(PointerEventArgs e, Visual v)
         {
             e.Handled = true;
+            e.PreventGestureRecognition();
             var currentPoint = e.GetCurrentPoint(v);
             if (e.RoutedEvent == PointerPressedEvent)
                 AddPoint(currentPoint.Position, Brushes.Green, 10);

+ 1 - 0
samples/ControlCatalog/Pages/PointerContactsTab.cs

@@ -72,6 +72,7 @@ public class PointerContactsTab : Control
         UpdatePointer(e);
         e.Pointer.Capture(this);
         e.Handled = true;
+        e.PreventGestureRecognition();
         base.OnPointerPressed(e);
     }
 

+ 1 - 0
samples/ControlCatalog/Pages/PointersPage.xaml.cs

@@ -72,6 +72,7 @@ Position: ??? ???";
     {
         e.Pointer.Capture(sender as Border);
         e.Handled = true;
+        e.PreventGestureRecognition();
     }
 
     private void InitializeComponent()