DragDrop.GiveFeedback DragDrop.GiveFeedback DragDrop.GiveFeedback Attached Event

定义

在拖放操作期间持续发生,使拖动源能够向用户提供反馈。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 GiveFeedbackEventHandler

对应的隧道事件为PreviewGiveFeedbackThe corresponding tunneling event is PreviewGiveFeedback.

适用于

另请参阅