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

定義

PreviewDragOver 事件處理常式加入指定的相依性物件中。Adds a PreviewDragOver event handler to a specified dependency object.

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

備註

PreviewDragOver n 物件拖曳到元素的範圍上方時, 就會發生此事件。The PreviewDragOver event occurs when n object is dragged over the element's bounds.

這個方法會為PreviewDragOver事件的通道版本加入處理常式。This method adds a handler for the tunneling version of the PreviewDragOver event. 若要加入此事件之反升版本的處理常式, AddDragOverHandler請參閱。To add a handler for the bubbling version of this event, see AddDragOverHandler.

適用於

另請參閱