DragEventHandler delegate

Applies to Windows and Windows Phone

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

Syntax


public delegate void DragEventHandler(
  object sender, 
  DragEventArgs e
)

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Parameters

sender

Type: System.Object [.NET] | Platform::Object [C++]

The object where the event handler is attached.

e

Type: DragEventArgs

The event data.

Remarks

DragEventHandler is the delegate you implement to handle these events:

These events are routed events. Changing the value of the Handled property of DragEventArgs from an event handler can influence how a routed event behaves. For more info on the routed event concept, see Events and routed events overview.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Events and routed events overview
DragEventArgs

 

 

Show:
© 2014 Microsoft