ActivityDesigner.OnGiveFeedback(GiveFeedbackEventArgs) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates the visual cues for feedback supplied to the user when performing a drag operation.
protected:
virtual void OnGiveFeedback(System::Windows::Forms::GiveFeedbackEventArgs ^ e);
protected virtual void OnGiveFeedback (System.Windows.Forms.GiveFeedbackEventArgs e);
abstract member OnGiveFeedback : System.Windows.Forms.GiveFeedbackEventArgs -> unit
override this.OnGiveFeedback : System.Windows.Forms.GiveFeedbackEventArgs -> unit
Protected Overridable Sub OnGiveFeedback (e As GiveFeedbackEventArgs)
A GiveFeedbackEventArgs that contains the event data.
The following describes how and when events related to drag-and-drop operations are raised.
If the designer is a valid drop target, the OnGiveFeedback event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the DragDropEffects enumeration.
Changes in the pointer position, keyboard state, and mouse button state are tracked.
If the user moves out of the designer bounds, the OnMouseLeave event is raised.
If the mouse enters another designer, the OnDragEnter for that designer is raised.
If the mouse moves but stays within the same designer, the OnDragOver event is raised.
If there is a change in the keyboard or mouse button state, the OnQueryContinueDrag event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the Action property of the event QueryContinueDragEventArgs.
If the value is DragAction.Continue
, the OnDragOver event is raised to continue the operation and the OnGiveFeedback event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the DragDropEffects enumeration.
Note
The OnDragOver and OnGiveFeedback events are paired so that as the mouse moves across the drop target, the user is supplied with the most up to date feedback on the mouse position.
If the value is DragAction.Drop
, the drop effect value is returned to the source, so that the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move.
If the value is DragAction.Cancel
, the OnDragLeave event is raised.
For more information about how to handle events, see Handling and Raising Events.
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: