DragDrop.RemoveDragLeaveHandler(DependencyObject, DragEventHandler) Method

Definition

从指定的依赖对象中删除 DragLeave 事件处理程序。Removes a DragLeave event handler from a specified dependency object.

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

Parameters

element
DependencyObject

要从中删除事件处理程序的依赖对象(UIElementContentElement)。The dependency object (a UIElement or ContentElement) from which to remove the event handler.

handler
DragEventHandler

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

Remarks

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

此方法为 DragLeave 事件的冒泡版本删除处理程序。This method removes a handler for the bubbling version of the DragLeave event. 若要为此事件的隧道版本删除处理程序,请参阅 RemovePreviewDragLeaveHandlerTo remove a handler for the tunneling version of this event, see RemovePreviewDragLeaveHandler.

Applies to

See also