aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs')
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs10
1 files changed, 10 insertions, 0 deletions
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<FrameworkElement> DragStarted;
+ public static event EventHandler<FrameworkElement> DragEnded;
+
+ #endregion
+
#region Delegates
/// <summary>
@@ -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();
}
}