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.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
See AddGiveFeedbackHandler, RemoveGiveFeedbackHandler
<object DragDrop.GiveFeedback="GiveFeedbackEventHandler" .../>

The GiveFeedback event is raised continuously while the drag source is being dragged. 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.

Caution noteCaution

This event is raised continuously during the drag-and-drop operation. Therefore, you should avoid resource-intensive tasks in the event handler. 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

The corresponding tunneling event is PreviewGiveFeedback.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft