Skip to main content

TreeDataGridSelectionChangedEventArgs<T> Class

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid

Provides strongly-typed data for the TreeDataGrid selection changed event.

public class TreeDataGridSelectionChangedEventArgs<T>

Inheritance: EventArgs -> TreeDataGridSelectionChangedEventArgs -> TreeDataGridSelectionChangedEventArgs<T>

Constructors

NameDescription
TreeDataGridSelectionChangedEventArgs<T>No summary available.

TreeDataGridSelectionChangedEventArgs<T> Constructor

public TreeDataGridSelectionChangedEventArgs<T>(System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> deselectedIndexes, System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> selectedIndexes, System.Collections.Generic.IReadOnlyList<T> deselectedItems, System.Collections.Generic.IReadOnlyList<T> selectedItems, System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> deselectedCellIndexes, System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> selectedCellIndexes)

Parameters

deselectedIndexes System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath>

selectedIndexes System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath>

deselectedItems System.Collections.Generic.IReadOnlyList<T>

selectedItems System.Collections.Generic.IReadOnlyList<T>

deselectedCellIndexes System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex>

selectedCellIndexes System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex>

Properties

NameDescription
DeselectedCellIndexesGets the cell indexes of the cells that were removed from the selection.
DeselectedIndexesGets the row indexes of the items that were removed from the selection.
DeselectedItemsGets the strongly-typed items that were removed from the selection.
SelectedCellIndexesGets the cell indexes of the cells that were added to the selection.
SelectedIndexesGets the row indexes of the items that were added to the selection.
SelectedItemsGets the strongly-typed items that were added to the selection.

DeselectedCellIndexes Property

Gets the cell indexes of the cells that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> DeselectedCellIndexes { get; set; }

Remarks

For row selection, this expands deselected rows across all columns. For cell selection, this contains the specific deselected cells.

DeselectedIndexes Property

Gets the row indexes of the items that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> DeselectedIndexes { get; set; }

Remarks

When items are removed from the data source, their indexes are no longer valid and will not appear in this collection. Use Avalonia.Controls.Selection.TreeDataGridSelectionChangedEventArgs.DeselectedItems to identify removed items in that case.

DeselectedItems Property

Gets the strongly-typed items that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<T> DeselectedItems { get; set; }

Remarks

When items are removed from the data source they are provided here as a concrete list that remains valid regardless of later source modifications. Otherwise (when items are deselected by a selection change) the items are resolved lazily against the data source and must be read before the source collection is next modified. Reading them after a modification (for example from an asynchronous or dispatcher-queued handler) throws InvalidOperationException.

SelectedCellIndexes Property

Gets the cell indexes of the cells that were added to the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> SelectedCellIndexes { get; set; }

Remarks

For row selection, this expands selected rows across all columns. For cell selection, this contains the specific selected cells.

SelectedIndexes Property

Gets the row indexes of the items that were added to the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> SelectedIndexes { get; set; }

SelectedItems Property

Gets the strongly-typed items that were added to the selection.

public System.Collections.Generic.IReadOnlyList<T> SelectedItems { get; set; }

Remarks

The items in this collection are resolved lazily against the data source, so they must be read before the source collection is next modified. Reading them after a modification (for example from an asynchronous or dispatcher-queued handler) throws InvalidOperationException. Use Avalonia.Controls.Selection.TreeDataGridSelectionChangedEventArgs<T>.SelectedIndexes, which is not affected, if you need to retain the change past a source modification.