private void test5() { //Matrix m = new Matrix(); //m.Scale(2.0,2.0); //m.Rotate(30); //m.Translate(200, 200); //image.RenderTransform = new MatrixTransform(m); //this.image.AddHandler(TouchEvent.TouchDownEvent, new TouchHandler(OnTouchDown)); //, null //MultiTouch.EnableGesture(this.canvas, new DragScaleRotate_G2(), null); //MultiTouch.EnableGesture(this.image, new DragScaleRotate_G2(true, true, true), null); //MultiTouch.EnableGesture(this.button, new DragScaleRotate_G2(true, true, true), null); Rect ScreenResolutionRect = new Rect(0, 0, System.Windows.SystemParameters.PrimaryScreenWidth, System.Windows.SystemParameters.PrimaryScreenHeight); DragScaleRotate dsr = MultiTouch.EnableGesture(this.image, new DragScaleRotate(true, true, true, true, ScreenResolutionRect), null) as DragScaleRotate; dsr.TranslateDamping = 0.95; //MultiTouch.EnableGesture(this.image, new MultiDragScaleRotate(true, true, true, true, ScreenResolutionRect), null); //MDSRInstance = MultiTouch.EnableGesture(this.image, new MultiDragScaleRotate(true, true, true, true, ScreenResolutionRect), null) as MultiDragScaleRotate; //MultiTouch.EnableGesture(this.image, new TouchEndGesture(), new GestureHandler(OnTouchEnd)); }
private void MouseSupport_Loaded(object sender, RoutedEventArgs e) { rect = new Rect(this.Left, this.Top, this.Width, this.Height); DragScaleRotate dsr = new DragScaleRotate(true, true, true, true, rect); dsr.TranslateDamping = 0.9; MultiTouch.EnableGesture(myImage, dsr, null); //MultiDragScaleRotate mdsr = MultiTouch.EnableGesture(myImage, new MultiDragScaleRotate(true, true, true, true, rect), null) as MultiDragScaleRotate; //mdsr.TranslateDamping = 0.9; //mdsr.AngleDamping = 0.95; //mdsr.ScaleDamping = 0.99; }