DragDrop.AddDragLeaveHandler(DependencyObject, DragEventHandler) DragDrop.AddDragLeaveHandler(DependencyObject, DragEventHandler) DragDrop.AddDragLeaveHandler(DependencyObject, DragEventHandler) DragDrop.AddDragLeaveHandler(DependencyObject, DragEventHandler) Method

定义

DragLeave 事件处理程序添加到指定的依赖对象。Adds a DragLeave event handler to a specified dependency object.

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

参数

element
DependencyObject DependencyObject DependencyObject DependencyObject

要对其添加事件处理程序的依赖对象(UIElementContentElement)。The dependency object (a UIElement or ContentElement) to which to add the event handler.

handler
DragEventHandler DragEventHandler DragEventHandler DragEventHandler

一个委托,用于引用要添加的处理程序方法。A delegate that references the handler method to be added.

注解

将对象拖出元素的边界时发生 @no__t 0 事件。The DragLeave event occurs when an object is dragged out of the element's bounds.

此方法为 @no__t 0 事件的冒泡版本添加处理程序。This method adds a handler for the bubbling version of the DragLeave event. 若要为此事件的隧道版本添加处理程序,请参阅 AddPreviewDragLeaveHandlerTo add a handler for the tunneling version of this event, see AddPreviewDragLeaveHandler.

适用于

另请参阅