ContentElement.DragOver ContentElement.DragOver ContentElement.DragOver ContentElement.DragOver Event


在輸入系統回報以此項目作為可能置放目標的基礎拖曳事件時發生。Occurs when the input system reports an underlying drag event with this element as the potential drop target.

 event System::Windows::DragEventHandler ^ DragOver;
public event System.Windows.DragEventHandler DragOver;
member this.DragOver : System.Windows.DragEventHandler 
Public Custom Event DragOver As DragEventHandler 


即使拖曳來源中項目範圍,就會發生此事件。This event occurs even if the drag originates in the element bounds. 如果拖曳開始界限之外,然後將移內,也會引發這個事件,以及DragEnter和相關預覽事件。If the drag starts outside the bounds and then moves inside, this event is also raised, as well as DragEnter and related preview events.

本項目中建立的別名DragDrop.DragOver附加事件,此類別,讓ContentElement.DragOver屬於類別的成員清單時ContentElement繼承為基底的項目。This event creates an alias for the DragDrop.DragOver attached event for this class so that ContentElement.DragOver is part of the class members list when ContentElement is inherited as a base element. 附加至事件處理常式DragOver事件會附加至基礎DragDrop.DragOver附加事件,並接收相同的事件資料執行個體。Event handlers that are attached to the DragOver event are attached to the underlying DragDrop.DragOver attached event and receive the same event data instance.

路由事件資訊Routed Event Information

識別項欄位Identifier field DragOverEvent
路由策略Routing strategy 事件反昇Bubbling
Delegate - 委派Delegate DragEventHandler
  • 對應的通道事件是PreviewDragOverThe corresponding tunneling event is PreviewDragOver.

  • 覆寫OnDragOver實作在衍生類別中這個事件的類別處理。Override OnDragOver to implement class handling for this event in derived classes.