DragDrop.RemovePreviewDropHandler(DependencyObject, DragEventHandler) 方法

定义

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

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

注解

在元素的边界内删除对象时,会发生 @no__t 0 事件。The PreviewDrop event occurs when an object is dropped within an element's bounds.

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

适用于

另请参阅