DragDrop.GiveFeedback 附加事件

定義

拖放作業正在進行時持續發生,並可讓拖曳來源提供意見反應給使用者。Occurs continuously while a drag-and-drop operation is in progress, and enables the drag source to give feedback to the user.

see AddGiveFeedbackHandler, and RemoveGiveFeedbackHandler
see AddGiveFeedbackHandler, and RemoveGiveFeedbackHandler
see AddGiveFeedbackHandler, and RemoveGiveFeedbackHandler

備註

在拖曳來源被拖曳的期間,會持續引發 GiveFeedback 事件。The GiveFeedback event is raised continuously while the drag source is being dragged. 這個事件會與放置目標上的 DragOver 事件配對。This event is paired with the DragOver event on the drop target. 這個事件的預設處理常式會檢查拖曳來源是否在有效的置放目標上。The default handler for this event checks whether the drag source is over a valid drop target. 如果是,則會檢查允許的置放目標效果。If it is, it checks the allowed effects of the drop target. 然後將允許的置放效果回饋給使用者。It then gives feedback to the end user regarding the allowed drop effects. 透過將滑鼠游標變更為不置放、複製或移動游標,通常可以完成這項作業。This is typically done by changing the mouse cursor to a no-drop, copy, or move cursor. 只有在需要使用自訂游標提供回饋給使用者時,才應該處理這個事件。You should only handle this event if you need to use custom cursors to provide feedback to the user. 如果您處理此事件,您必須將它標示為已處理,以防止預設行為覆寫您的處理常式。If you handle this event, you must mark it as handled to prevent the default behavior from overriding your handler.

警告

這個事件會在拖放作業期間持續引發。This event is raised continuously during the drag-and-drop operation. 因此,您應該在事件處理常式中避免耗用大量資源的工作。Therefore, you should avoid resource-intensive tasks in the event handler. 例如,使用快取資料指標,而不是每次引發 GiveFeedback 事件都建立新的資料指標。For example, use a cached cursor instead of creating a new cursor each time the GiveFeedback event is raised.

路由事件資訊Routed Event Information

識別碼欄位Identifier field GiveFeedbackEvent
路由策略Routing strategy 路由Bubbling
Delegate - 委派Delegate GiveFeedbackEventHandler

對應的通道事件為 PreviewGiveFeedbackThe corresponding tunneling event is PreviewGiveFeedback.

適用於

另請參閱