DragEventHandler Delegate

Definition

Represents the method that will handle the DragEnter, DragLeave, DragOver, and Drop events of a UIElement.

public delegate void DragEventHandler(Platform::Object ^ sender, DragEventArgs ^ e);
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Guid(662371459, 52071, 22216, 182, 1, 27, 156, 15, 28, 61, 50)]
[Windows.Foundation.Metadata.WebHostHidden]
public delegate void DragEventHandler(object sender, DragEventArgs e);
Public Delegate Sub DragEventHandler(sender As Object, e As DragEventArgs)

Parameters

sender
Object

The object where the event handler is attached.

e
DragEventArgs

The event data.

Inheritance
DragEventHandler
Attributes
Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.GuidAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute

Remarks

DragEventHandler is the delegate you implement to handle these events:

The Control class has pre-wired event handlers that Control derived types can override to provide class-based handling for the drag-drop events,. These methods are:

The Windows Runtime implementation of drag-drop concepts permits only certain controls and input actions to initiate a drag-drop action. There is no generalized DoDragDrop method that would permit any UI element to initiate a drag-drop action. The main source of a drag-drop action is when you drag the items of a list such as GridView.

Applies to

See also