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)); }
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); }