Skip to main content

TreeDataGridRowDragStartedEventArgs Class

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid
public class TreeDataGridRowDragStartedEventArgs

Inheritance: EventArgs -> RoutedEventArgs -> TreeDataGridRowDragStartedEventArgs

Remarks

This event is raised when a drag operation in a Avalonia.Controls.TreeDataGrid control begins. It contains information about the models being dragged and allows for configuring the permitted drag effects.

Constructors

NameDescription
TreeDataGridRowDragStartedEventArgsNo summary available.

TreeDataGridRowDragStartedEventArgs Constructor

public TreeDataGridRowDragStartedEventArgs(System.Collections.Generic.IEnumerable<object> models)

Parameters

models System.Collections.Generic.IEnumerable<object>

Properties

NameDescription
AllowedEffectsGets or sets the allowed effects for the drag operation.
ModelsGets the collection of model objects that represent the rows being dragged.
HandledGets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs.
RouteGets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event. Inherited from RoutedEventArgs.
RoutedEventGets or sets the routed event associated with these event args. Inherited from RoutedEventArgs.
SourceGets or sets the source object that raised the routed event. Inherited from RoutedEventArgs.

AllowedEffects Property

Gets or sets the allowed effects for the drag operation.

public Avalonia.Input.DragDropEffects AllowedEffects { get; set; }

Remarks

This property can be used to control what operations (move, copy, etc.) are permitted during the drag operation. By default, when Avalonia.Controls.TreeDataGrid.AutoDragDropRows is enabled, this is set to Avalonia.Input.DragDropEffects.Move. Setting this to Avalonia.Input.DragDropEffects.None will cancel the drag operation.

Models Property

Gets the collection of model objects that represent the rows being dragged.

public System.Collections.Generic.IEnumerable<object> Models { get; set; }

Remarks

These are the underlying data models for the selected rows, not the visual row elements.