From 6ed849ee54a2f30315a622242f38dce92a309991 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 7 Jan 2018 13:33:24 +0200 Subject: Added Application Firmware Versions To Machine Designer. --- Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.DragAndDrop') diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs index 122954de8..fe58367aa 100644 --- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs +++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs @@ -452,7 +452,8 @@ namespace Tango.DragAndDrop //Point dropPoint = dropElement.TransformToAncestor(rootElement).Transform(new Point(0, 0)); Point dropPoint = dropElement.PointToScreen(new Point(0, 0)); - Rect dropRect = new Rect(dropPoint, new Size(dropElement.ActualWidth, dropElement.ActualHeight)); + var dropElementScaledSize = dropElement.PointToScreen(new Point(dropElement.ActualWidth, dropElement.ActualHeight)) - dropElement.PointToScreen(new Point(0, 0)); + Rect dropRect = new Rect(dropPoint, new Size(dropElementScaledSize.X, dropElementScaledSize.Y)); Rect dragRect = new Rect(Canvas.GetLeft(_dragBorder), Canvas.GetTop(_dragBorder), _dragBorder.Width / 2, _dragBorder.Height); Point mousePoint = rootElement.PointToScreen(Mouse.GetPosition(rootElement)); -- cgit v1.3.1