DragDrop.RemoveDragLeaveHandler(DependencyObject, DragEventHandler) 方法

定義

從所指定相依性物件中移除 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)

參數

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.

備註

當物件拖曳出元素的界限時,就會發生 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.

適用於

另請參閱