ITreeDataGridRowSelection Interface
Definition
Provides non-generic access to row selection state.
public interface ITreeDataGridRowSelection
Remarks
Avalonia.Controls.Selection.TreeDataGridRowSelectionModel<T> is generic, but the Avalonia.Controls.TreeDataGrid and its automation peers need non-generic access to the row selection state. Custom row selection models should implement this interface in order to expose their selection to UI Automation clients such as screen readers, and to support row drag/drop.
This interface is experimental: it is exposed to allow custom selection models to be implemented, but it may be changed or removed in a future release.
Methods
| Name | Description |
|---|---|
| Deselect | Removes the item at the specified index from the selection. |
| IsSelected | Determines whether the item at the specified index is selected. |
| Select | Adds the item at the specified index to the selection. |
Deselect Method
Removes the item at the specified index from the selection.
public void Deselect(Avalonia.Controls.IndexPath index)
Parameters
index Avalonia.Controls.IndexPath
The index of the item to deselect.
IsSelected Method
Determines whether the item at the specified index is selected.
public bool IsSelected(Avalonia.Controls.IndexPath index)
Parameters
index Avalonia.Controls.IndexPath
The index of the item in the source data.
Returns
bool
true if the item is selected; otherwise false.
Select Method
Adds the item at the specified index to the selection.
public void Select(Avalonia.Controls.IndexPath index)
Parameters
index Avalonia.Controls.IndexPath
The index of the item to select.
Properties
| Name | Description |
|---|---|
| Count | Gets the number of selected items. |
| SelectedIndex | Gets or sets the selected index. Setting this value clears the existing selection and selects the single specified item. |
| SelectedIndexes | Gets the indexes of the selected items. |
| SelectedItems | Gets the selected items as an untyped list. |
Count Property
Gets the number of selected items.
public int Count { get; set; }
SelectedIndex Property
Gets or sets the selected index. Setting this value clears the existing selection and selects the single specified item.
public Avalonia.Controls.IndexPath SelectedIndex { get; set; }
SelectedIndexes Property
Gets the indexes of the selected items.
public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> SelectedIndexes { get; set; }
SelectedItems Property
Gets the selected items as an untyped list.
public System.Collections.Generic.IReadOnlyList<object> SelectedItems { get; set; }