コード例 #1
0
        //*****Recognizer Creation ********

        private void addPanRecognizer()
        {
            PanGestureRecognizer = new MotionPanGetsureRecognizer();
            PanGestureRecognizer.setMotionPanListener(this);
            PanGestureRecognizer.NumberOfFingersPerHandRequired = 1;
            PanGestureRecognizer.NumberOfHandsRequired          = 1;
            PanGestureRecognizer.startListening();
        }
コード例 #2
0
 private void addPanRecognizer()
 {
     MotionPanGetsureRecognizer PanGestureRecognizer = new MotionPanGetsureRecognizer();
     PanGestureRecognizer.setMotionPanListener(this);
     PanGestureRecognizer.NumberOfFingersPerHandRequired = 1;
     PanGestureRecognizer.NumberOfHandsRequired = 1;
     PanGestureRecognizer.startListening();
 }
コード例 #3
0
 public void motionDidPan(MotionPanGetsureRecognizer recognizer)
 {
     if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateBegan)
     {
         System.Console.WriteLine("Pan did Begin");
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateChanged)
     {
         System.Console.WriteLine("Pan did Change  x:" + recognizer.centerPoint.x + "     y:" + recognizer.centerPoint.y + "     z:" + recognizer.centerPoint.z);
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateEnded)
     {
         System.Console.WriteLine("Pan did End");
     }
 }
コード例 #4
0
 public void motionDidPan(MotionPanGetsureRecognizer recognizer)
 {
     if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateBegan)
     {
         System.Console.WriteLine("Pan did Begin");
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateChanged)
     {
         Point newPoint = MotionGestureRecognizer.locationOfVectorInWindow(recognizer.centerPoint, this, 2);
         Thickness t = new Thickness(newPoint.X, newPoint.Y, 100, 100);
         
         mainWindow.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => this.mainCanvas.Margin = t));
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateEnded)
     {
         System.Console.WriteLine("Pan did End");
     }
 }
コード例 #5
0
 public void motionDidPan(MotionPanGetsureRecognizer recognizer)
 {
     if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateBegan)
     {
         System.Console.WriteLine("Pan did Begin");
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateChanged)
     {
         System.Console.WriteLine("Pan did Change  x:"+recognizer.centerPoint.x+"     y:"+recognizer.centerPoint.y+"     z:"+recognizer.centerPoint.z);
     }
     else if (recognizer.state == MotionGestureRecognizerState.MotionGestureRecognizerStateEnded)
     {
         System.Console.WriteLine("Pan did End");
     }
 }