Beispiel #1
0
        private Point GetEffectiveDragOffset(DragDropOptions dragDropOptions)
        {
            var resultPoint    = new Point();
            var dragCueElement = (FrameworkElement)dragDropOptions.DragCue;

            dragCueElement.Measure(new Size(double.MaxValue, double.MaxValue));
            var transformation = Application.Current.RootVisual.TransformToVisual(dragDropOptions.Source);

            resultPoint = transformation.Transform(dragDropOptions.CurrentDragPoint);

            return(new Point(resultPoint.X, resultPoint.Y));
        }
Beispiel #2
0
        private Point GetEffectiveDragOffset(DragDropOptions dragDropOptions)
        {
            var resultPoint = new Point();
            var dragCueElement = (FrameworkElement)dragDropOptions.DragCue;
            dragCueElement.Measure ( new Size(double.MaxValue, double.MaxValue) );
            var transformation = Application.Current.RootVisual.TransformToVisual(dragDropOptions.Source);

            resultPoint = transformation.Transform(dragDropOptions.CurrentDragPoint);

            return new Point(resultPoint.X, resultPoint.Y);
        }