From dd18ae0c096a34048477297ba848a089a99eece1 Mon Sep 17 00:00:00 2001 From: Roy Date: Sun, 7 Jan 2018 09:27:42 +0200 Subject: Progress on machine designer... --- Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 52cb0d954..122954de8 100644 --- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs +++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs @@ -45,6 +45,13 @@ namespace Tango.DragAndDrop private static Border _dragBorder; private const int MIN_DRAG_OFFSET = 8; + #region Events + + public static event EventHandler DragStarted; + public static event EventHandler DragEnded; + + #endregion + #region Delegates /// @@ -421,6 +428,8 @@ namespace Tango.DragAndDrop { if (Mouse.LeftButton == MouseButtonState.Pressed && _currentDragedElement != null) { + DragStarted?.Invoke(_currentDragedElement, _currentDragedElement); + var surface = GetDraggingSurface(_currentDragedElement); var rootElement = surface.Parent as FrameworkElement; @@ -473,6 +482,7 @@ namespace Tango.DragAndDrop } else { + DragEnded?.Invoke(_currentDragedElement, _currentDragedElement); DropDraggable(); } } -- cgit v1.3.1