Example #1
0
 private void Canvas_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
 {
     foreach (var point in e.GetIntermediatePoints(canvas))
     {
         if (point.IsInContact)
         {
             selectionEndIndex = GetHitIndex(point.Position);
         }
     }
     canvas.Invalidate();
     e.Handled = true;
 }
Example #2
0
 void _root_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
 {
     gestureRecognizer.ProcessMoveEvents(e.GetIntermediatePoints(null));
 }
        void InkingArea_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
        {
            var pointerPoint = e.GetCurrentPoint(InkingArea);

            if (pointerId == (int)pointerPoint.PointerId)
            {
                switch (inkManager.Mode)
                {
                    case Windows.UI.Input.Inking.InkManipulationMode.Erasing:
                        // Check if something has been erased.
                        // In erase mode InkManager::ProcessPointerUpdate returns an invalidate
                        // rectangle: if it is not degenerate something has been erased
                        // In erase mode we don't bother processing intermediate points
                        var invalidateRect = (Windows.Foundation.Rect)inkManager.ProcessPointerUpdate(e.GetCurrentPoint(InkingArea));
                        if (invalidateRect.Height != 0 && invalidateRect.Width != 0)
                        {
                            // We don't know what has been erased so we clear the render
                            // and add back all the ink saved in the ink manager
                            renderer.Clear();
                            renderer.AddInk(inkManager.GetStrokes());
                        }
                        break;
                    case Windows.UI.Input.Inking.InkManipulationMode.Inking:
                    case Windows.UI.Input.Inking.InkManipulationMode.Selecting:
                        // Process intermediate points
                        var intermediatePoints = e.GetIntermediatePoints(InkingArea);
                        for (int i = intermediatePoints.Count - 1; i >= 0; i--)
                        {
                            inkManager.ProcessPointerUpdate(intermediatePoints[i]);
                        }

                        // Live rendering
                        renderer.UpdateLiveRender(pointerPoint);
                        break;
                }
            }
        }
 void OnSwipeAreaPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
 {
     this.swipeAreaGestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(this.SwipeArea));
 }
 void OnLogoPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
 {
     this.logoGestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(this.logoImage));
 }
Example #6
0
        private void OnPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
        {
            // Route the events to the gesture recognizer.
            // All intermediate points are passed to the gesture recognizer in
            // the coordinate system of the reference element.
            this._gestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(this._reference));

            // Mark event handled, to prevent execution of default event handlers
            args.Handled = true;
        }
 void OnPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
 {
     this.gestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(mainGrid));
 }
Example #8
0
 void OnPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
 {
     this.gestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(this.reference));
     args.Handled = true;
 }