DragDrop.RemovePreviewDragLeaveHandler(DependencyObject, DragEventHandler) 方法

定義

從所指定相依性物件中移除 PreviewDragLeave 事件處理常式。Removes a PreviewDragLeave event handler from a specified dependency object.

public:
 static void RemovePreviewDragLeaveHandler(System::Windows::DependencyObject ^ element, System::Windows::DragEventHandler ^ handler);
public static void RemovePreviewDragLeaveHandler (System.Windows.DependencyObject element, System.Windows.DragEventHandler handler);
static member RemovePreviewDragLeaveHandler : System.Windows.DependencyObject * System.Windows.DragEventHandler -> unit
Public Shared Sub RemovePreviewDragLeaveHandler (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.

備註

當物件拖曳出元素的界限時,就會發生 PreviewDragLeave 事件。The PreviewDragLeave event occurs when an object is dragged out of the element's bounds.

這個方法會移除通道版本的 PreviewDragLeave 事件的處理常式。This method removes a handler for the tunneling version of the PreviewDragLeave event. 若要移除此事件之反升版本的處理常式,請參閱 RemoveDragLeaveHandlerTo remove a handler for the bubbling version of this event, see RemoveDragLeaveHandler.

適用於

另請參閱