Skip to main content

TreeDataGridColumnReorderingEventArgs Class

Definition

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

Inheritance: EventArgs -> RoutedEventArgs -> CancelRoutedEventArgs -> TreeDataGridColumnReorderingEventArgs

Remarks

This event is raised when the user drops a dragged column header at a new position, before the column is moved. Setting Avalonia.Interactivity.CancelRoutedEventArgs.Cancel to true prevents the move.

Constructors

TreeDataGridColumnReorderingEventArgs Constructor

Initializes a new instance of the Avalonia.Controls.TreeDataGridColumnReorderingEventArgs class.

public TreeDataGridColumnReorderingEventArgs(Avalonia.Controls.TreeDataGridColumn column, int oldIndex, int newIndex)

Parameters

column Avalonia.Controls.TreeDataGridColumn

The column being reordered.

oldIndex int

The current index of the column.

newIndex int

The index to which the column will be moved.

Properties

NameDescription
CancelGets or sets a value indicating whether the routed event should be canceled. Inherited from CancelRoutedEventArgs.
ColumnGets the column being reordered.
HandledGets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs.
NewIndexGets the index in the columns collection to which the column will be moved.
OldIndexGets the current index of the column in the columns collection.
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.

Column Property

Gets the column being reordered.

public Avalonia.Controls.TreeDataGridColumn Column { get; set; }

NewIndex Property

Gets the index in the columns collection to which the column will be moved.

public int NewIndex { get; set; }

OldIndex Property

Gets the current index of the column in the columns collection.

public int OldIndex { get; set; }