Skip to main content

ITreeDataGridRowSelectionModel<T> Interface

Definition

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

Provides strongly-typed access to the row selection state for a Avalonia.Controls.TreeDataGrid control.

public interface ITreeDataGridRowSelectionModel<T>

Remarks

Avalonia.Controls.Selection.ITreeDataGridRowSelectionModel<T> extends the non-generic Avalonia.Controls.Selection.ITreeDataGridRowSelectionModel interface to provide strongly-typed access to the selected rows.

Properties

NameDescription
SelectedItemGets the currently selected row item.
SelectedItemsGets the currently selected row items.

SelectedItem Property

Gets the currently selected row item.

public T SelectedItem { get; set; }

Value

The primary selected row item, or the default value for T if no row is selected.

SelectedItems Property

Gets the currently selected row items.

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

Value

A read-only list of the selected row items, with the type T.

Events

NameDescription
SelectionChangedOccurs when the row selection changes.

SelectionChanged Event

Occurs when the row selection changes.

public event EventHandler<Avalonia.Controls.Selection.TreeSelectionModelSelectionChangedEventArgs<T><T>> SelectionChanged

Remarks

This event is raised when the selection of rows changes, either through user interaction or programmatically. It provides strongly-typed access to the selection changes.