RowHeaderCell Class
Definition
Represents a read-only cell that displays the visual row number.
public class RowHeaderCell
Remarks
The Avalonia.Controls.Models.TreeDataGrid.RowHeaderCell class displays the visual row number (0, 1, 2...) in a TreeDataGrid. The displayed number always represents the visual position of the row, remaining sequential regardless of sorting or whether the data source is flat or hierarchical.
This cell is always read-only and cannot be edited by the user. It is designed to be used with Avalonia.Controls.Models.TreeDataGrid.RowHeaderColumn<T> to display row numbers.
Properties
| Name | Description |
|---|---|
| CanEdit | Gets a value indicating whether the cell can enter edit mode. |
| EditGestures | Gets the gestures that cause the cell to enter edit mode. |
| Instance | Gets the singleton instance of Avalonia.Controls.Models.TreeDataGrid.RowHeaderCell. |
| Value | Gets the value of the cell. |
CanEdit Property
Gets a value indicating whether the cell can enter edit mode.
public bool CanEdit { get; set; }
Remarks
Always returns false as row header cells are read-only.
EditGestures Property
Gets the gestures that cause the cell to enter edit mode.
public Avalonia.Controls.Models.TreeDataGrid.BeginEditGestures EditGestures { get; set; }
Remarks
Returns Avalonia.Controls.Models.TreeDataGrid.BeginEditGestures.None as row header cells cannot be edited.
Instance Property
Gets the singleton instance of Avalonia.Controls.Models.TreeDataGrid.RowHeaderCell.
public Avalonia.Controls.Models.TreeDataGrid.RowHeaderCell Instance { get; set; }
Remarks
Since all row header cells behave identically (displaying the visual row index), a single instance can be shared across all rows.
Value Property
Gets the value of the cell.
public object Value { get; set; }
Remarks
Returns null as the actual displayed value (the visual row index) is determined at render time by Avalonia.Controls.Primitives.TreeDataGridRowHeaderCell.