UIElement.DragOver UIElement.DragOver UIElement.DragOver UIElement.DragOver Event

定義

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

public:
 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附加事件的別名, 因此當UIElement.DragOver繼承為基底專案時UIElement , 就是類別成員清單的一部分。This event creates an alias for the DragDrop.DragOver attached event for this class so that UIElement.DragOver is part of the class members list when UIElement 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.

適用於

另請參閱