Skip to main content

TreeDataGridCell Class

Definition

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

Base class for controls which display cells in a Avalonia.Controls.TreeDataGrid control.

public class TreeDataGridCell

Remarks

TreeDataGridCell is the base class for cells in a TreeDataGrid control. It provides core functionality for cell realization, selection, and editing. Cells are created by the Avalonia.Controls.Primitives.TreeDataGridElementFactory and are reused as the user scrolls through the grid.

This class implements the following pseudo-classes:

  • :editing - Set when the cell is in edit mode
  • :selected - Set when the cell is selected

Cell editing can be triggered through various gestures including double-tap, F2, or single tap, depending on the Avalonia.Controls.BeginEditGestures settings of the cell's model.

Properties

NameDescription
ColumnIndexGets the index of the column that this cell belongs to.
IsEditingGets a value indicating whether the cell is in edit mode.
IsEffectivelySelectedGets a value indicating whether the cell is effectively selected, either directly or because its containing row is selected.
IsSelectedGets a value indicating whether the cell is selected.
ModelGets the data model for the cell.
RowIndexGets the index of the row that this cell belongs to.

ColumnIndex Property

Gets the index of the column that this cell belongs to.

public int ColumnIndex { get; set; }

Value

The zero-based column index, or -1 if the cell is not realized.

IsEditing Property

Gets a value indicating whether the cell is in edit mode.

public bool IsEditing { get; set; }

IsEffectivelySelected Property

Gets a value indicating whether the cell is effectively selected, either directly or because its containing row is selected.

public bool IsEffectivelySelected { get; set; }

IsSelected Property

Gets a value indicating whether the cell is selected.

public bool IsSelected { get; set; }

Model Property

Gets the data model for the cell.

public Avalonia.Controls.Models.ITreeDataGridCellModel Model { get; set; }

RowIndex Property

Gets the index of the row that this cell belongs to.

public int RowIndex { get; set; }

Value

The zero-based row index, or -1 if the cell is not realized.

Fields

IsSelectedProperty Field

Defines the Avalonia.Controls.Primitives.TreeDataGridCell.IsSelected property.

public Avalonia.DirectProperty<Avalonia.Controls.Primitives.TreeDataGridCell, bool> IsSelectedProperty