/// <summary> /// Unregisters a drop handler. /// </summary> /// <param name="dependencyObject">Element from which to unregister the handler.</param> /// <param name="handler"> Event handler for drag & drop actions. </param> public static void RemoveDropHandler(DependencyObject dependencyObject, DragDropEventHandler handler) { ((FrameworkElement)dependencyObject).RemoveHandler(Drop, handler); }
/// <summary> /// Registers a Drag move handler with an element. /// </summary> /// <param name="dependencyObject">Element to register the handler with.</param> /// <param name="handler"> Event handler for drag & drop actions. </param> public static void AddDragMoveHandler(DependencyObject dependencyObject, DragDropEventHandler handler) { ((FrameworkElement)dependencyObject).AddHandler(DragMove, handler); }