private void TargetOnPreviewMouseLeftButtonDown(object sender, FingerManipulationEventArgs fingerManipulationEventArgs)
        {
            fingerManipulationEventArgs.Handled = true;

            Pointer = fingerManipulationEventArgs.Pointer;

            var startingPoint = fingerManipulationEventArgs.GetPosition(FrameOfReference);

            DragOperation = new DragOperation(ItemToDrag, startingPoint, SnappingEngine);

            FrameOfReference.CaptureInput(Pointer);

            FrameOfReference.FingerMove += FrameOfReferenceOnMouseMove;
            FrameOfReference.FingerUp += FrameOfReferenceOnMouseLeftButtonUp;            
        }
예제 #2
0
        private void TargetOnPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs args)
        {
            args.Handled = true;

            var startingPoint = args.GetPosition(FrameOfReference).ActLike<IPoint>();
            DragOperation = new DragOperation(ItemToDrag, startingPoint, SnappingEngine);

            FrameOfReference.CaptureMouse();

            FrameOfReference.MouseMove += FrameOfReferenceOnMouseMove;
            FrameOfReference.MouseLeftButtonUp += InputElementOnMouseLeftButtonUp;
        }