コード例 #1
0
        private void FrameOfReferenceOnMouseMove(object sender, FingerManipulationEventArgs args)
        {
            if (!IsDragging)
            {
                IsDragging = true;
                OnDragStarted();
            }

            var position = args.GetPosition(FrameOfReference);

            DragOperation.NotifyNewPosition(position);
        }
コード例 #2
0
        private void FrameOfReferenceOnMouseLeftButtonUp(object sender, FingerManipulationEventArgs args)
        {
            if (DragOperation != null)
            {
                var position = args.GetPosition(FrameOfReference);
                DragOperation.NotifyNewPosition(Mapper.Map <Point>(position));
                FrameOfReference.ReleaseInput(Pointer);
                FrameOfReference.FingerMove -= FrameOfReferenceOnMouseMove;
                DragOperation = null;
                SnappingEngine.ClearSnappedEdges();

                IsDragging = false;
                Pointer    = null;
                OnDragEnd();
            }
        }