DragStartingEventArgs Class

Definition

Provides event data for the DragStarting event.

Equivalent WinUI class: Microsoft.UI.Xaml.DragStartingEventArgs.

public ref class DragStartingEventArgs sealed : RoutedEventArgs
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class DragStartingEventArgs sealed : RoutedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class DragStartingEventArgs : RoutedEventArgs
Public NotInheritable Class DragStartingEventArgs
Inherits RoutedEventArgs
Inheritance
DragStartingEventArgs
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Version history

Windows version SDK version Value added
1607 14393 AllowedOperations

Properties

AllowedOperations

Gets or sets the allowed data package operations (none, move, copy, and/or link) for the drag and drop operation.

Equivalent WinUI property: Microsoft.UI.Xaml.DragStartingEventArgs.AllowedOperations.

Cancel

Gets or sets a value that indicates whether the drag action should be canceled.

Equivalent WinUI property: Microsoft.UI.Xaml.DragStartingEventArgs.Cancel.

Data

Gets the data payload associated with a drag action.

Equivalent WinUI property: Microsoft.UI.Xaml.DragStartingEventArgs.Data.

DragUI

Gets the visual representation of the data being dragged.

Equivalent WinUI property: Microsoft.UI.Xaml.DragStartingEventArgs.DragUI.

OriginalSource

Gets a reference to the object that raised the event. This is often a template part of a control rather than an element that was declared in your app UI.

Equivalent WinUI property: Microsoft.UI.Xaml.RoutedEventArgs.OriginalSource.

(Inherited from RoutedEventArgs)

Methods

GetDeferral()

Supports asynchronous drag-and-drop operations by creating and returning a DragOperationDeferral object.

Equivalent WinUI method: Microsoft.UI.Xaml.DragStartingEventArgs.GetDeferral.

GetPosition(UIElement)

Returns a drop point that is relative to a specified UIElement.

Equivalent WinUI method: Microsoft.UI.Xaml.DragStartingEventArgs.GetPosition.

Applies to

See also