Table of Contents

Class DragDrop

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll
public static class DragDrop
Inheritance
DragDrop
Inherited Members

Fields

AllowDropProperty

public static readonly AttachedProperty<bool> AllowDropProperty

Field Value

AttachedProperty<bool>

DragEnterEvent

Event which is raised, when a drag-and-drop operation enters the element.

public static readonly RoutedEvent<DragEventArgs> DragEnterEvent

Field Value

RoutedEvent<DragEventArgs>

DragLeaveEvent

Event which is raised, when a drag-and-drop operation leaves the element.

public static readonly RoutedEvent<DragEventArgs> DragLeaveEvent

Field Value

RoutedEvent<DragEventArgs>

DragOverEvent

Event which is raised, when a drag-and-drop operation is updated while over the element.

public static readonly RoutedEvent<DragEventArgs> DragOverEvent

Field Value

RoutedEvent<DragEventArgs>

DropEvent

Event which is raised, when a drag-and-drop operation should complete over the element.

public static readonly RoutedEvent<DragEventArgs> DropEvent

Field Value

RoutedEvent<DragEventArgs>

Methods

DoDragDrop(PointerEventArgs, IDataObject, DragDropEffects)

Starts a dragging operation with the given IDataObject and returns the applied drop effect from the target. DataObject

public static Task<DragDropEffects> DoDragDrop(PointerEventArgs triggerEvent, IDataObject data, DragDropEffects allowedEffects)

Parameters

triggerEvent PointerEventArgs
data IDataObject
allowedEffects DragDropEffects

Returns

Task<DragDropEffects>

GetAllowDrop(Interactive)

Gets a value indicating whether the given element can be used as the target of a drag-and-drop operation.

public static bool GetAllowDrop(Interactive interactive)

Parameters

interactive Interactive

Returns

bool

SetAllowDrop(Interactive, bool)

Sets a value indicating whether the given interactive can be used as the target of a drag-and-drop operation.

public static void SetAllowDrop(Interactive interactive, bool value)

Parameters

interactive Interactive
value bool