DragDrop.DragLeave Attached Event

 

Occurs when an object is dragged out of the bounds of an element that is acting as a drop target without being dropped.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

See AddDragLeaveHandler, RemoveDragLeaveHandler

This event is raised once each time an object is dragged out of the bounds of an element that is acting as a drop target without being dropped. This event is not raised if the element’s AllowDrop property is false.

You typically handle this event to undo any changes that you made in the DragEnter event handler.

Identifier field

DragLeaveEvent

Routing strategy

Bubbling

Delegate

DragEventHandler

The corresponding tunneling event is PreviewDragLeave.

The following example shows the DragLeave event handler for an Ellipse element. This code undoes the preview performed in the DragEnter event handler by applying the saved Brush to the ellipse.

No code example is currently available or this language may not be supported.
Return to top
Show: