DragEventArgs

EventArgsReferences
public class DragEventArgs : EventArgs
Drag/Drop event arguments.

Constructors

DragEventArgs

#
public DragEventArgs(Control source, DataObject data, DragEffects allowedEffects, PointF location, Keys modifiers, MouseButtons buttons, object controlObject = null)
Initializes a new instance of the DragEventArgs class.
source (Control)Drag operation source control.
data (DataObject)Drag data.
allowedEffects (DragEffects)Allowed operation.
location (PointF)Location of the mouse cursor for this event
modifiers (Keys)Modifier buttons pressed for this event
buttons (MouseButtons)Mouse buttons pressed for this event
controlObject (object = null)Platform-specific object to store additional arguments/info

Properties

ControlObject

#
public object ControlObject { get; }
Gets the instance of the platform-specific object associated with the drag event
Remarks: This can be used by platform implementations to store additional information about the drag operation, such as the parent object and child index for TreeGridView.GetDragInfo(DragEventArgs).
The platform-specific control object.

SupportsDropDescription

#
public virtual bool SupportsDropDescription { get; }
Gets a value indicating that the SetDropDescription(string, string) method is supported for the current drag/drop operation.

Methods

SetDropDescription

#
public virtual void SetDropDescription(string format, string inner = null)
Sets the drop description when dragging overtop your control to specify additional context of what will be done.
Remarks: Note that some platforms may not support this, as it is only a hint for drag/drop operations. Use SupportsDropDescription to determine if the platform supports it. Currently works only in Wpf, and WinForms.
format (string)Format string, include {0} in the string for the inner parameter
inner (string = null)Optional inner parameter to be highlighted from the rest of the string.