Bewerken

Delen via


DragDrop.AddDropHandler(DependencyObject, DragEventHandler) Method

Definition

Adds a Drop event handler to a specified dependency object.

public:
 static void AddDropHandler(System::Windows::DependencyObject ^ element, System::Windows::DragEventHandler ^ handler);
public static void AddDropHandler (System.Windows.DependencyObject element, System.Windows.DragEventHandler handler);
static member AddDropHandler : System.Windows.DependencyObject * System.Windows.DragEventHandler -> unit
Public Shared Sub AddDropHandler (element As DependencyObject, handler As DragEventHandler)

Parameters

element
DependencyObject

The dependency object (a UIElement or ContentElement) to which to add the event handler.

handler
DragEventHandler

A delegate that references the handler method to be added.

Remarks

The Drop event occurs when an object is dropped within an element's bounds.

This method adds a handler for the bubbling version of the Drop event. To add a handler for the tunneling version of this event, see AddPreviewDropHandler.

Applies to

See also