Skip to main content

TreeDataGridCellsPresenter Class

Definition

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

Presents and manages cells within a row of a Avalonia.Controls.TreeDataGrid control.

public class TreeDataGridCellsPresenter

Inheritance: TreeDataGridColumnarPresenterBase<TreeDataGridColumn> -> TreeDataGridCellsPresenter

Implements: IChildIndexProvider

Remarks

TreeDataGridCellsPresenter is responsible for creating, recycling, and arranging cells horizontally within a row of a TreeDataGrid. It handles the virtualization of cells, ensuring that only visible cells are realized in the visual tree to improve performance.

This presenter is typically used within a Avalonia.Controls.Primitives.TreeDataGridRow control template to display the cells for that row. It coordinates with its parent row and the TreeDataGrid to manage cell lifecycle, selection state, and layout.

Constructors

NameDescription
TreeDataGridCellsPresenterNo summary available.

TreeDataGridCellsPresenter Constructor

public TreeDataGridCellsPresenter()

Methods

NameDescription
GetChildIndexNo summary available.
TryGetTotalCountNo summary available.

GetChildIndex Method

public int GetChildIndex(Avalonia.LogicalTree.ILogical child)

Parameters

child Avalonia.LogicalTree.ILogical

Returns

int

TryGetTotalCount Method

public bool TryGetTotalCount(int& count)

Parameters

count int&

Returns

bool

Properties

NameDescription
FrozenColumnCountGets or sets the number of frozen columns.
RowIndexGets the index of the row that this presenter is currently displaying.
RowsGets or sets the rows collection from which to obtain cell data.

FrozenColumnCount Property

Gets or sets the number of frozen columns.

public int FrozenColumnCount { get; set; }

Remarks

Frozen columns do not scroll horizontally and remain visible at all times.

RowIndex Property

Gets the index of the row that this presenter is currently displaying.

public int RowIndex { get; set; }

Value

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

Rows Property

Gets or sets the rows collection from which to obtain cell data.

public Avalonia.Controls.TreeDataGridRows Rows { get; set; }

Value

The collection of rows used to populate cells in this presenter.

Fields

FrozenColumnCountProperty Field

Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.FrozenColumnCount property.

public Avalonia.StyledProperty<int> FrozenColumnCountProperty

RowsProperty Field

Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.Rows property.

public Avalonia.DirectProperty<Avalonia.Controls.Primitives.TreeDataGridCellsPresenter, Avalonia.Controls.TreeDataGridRows> RowsProperty

Events

NameDescription
ChildIndexChangedOccurs when the index of a child element in the presenter changes.

ChildIndexChanged Event

Occurs when the index of a child element in the presenter changes.

public event EventHandler<Avalonia.LogicalTree.ChildIndexChangedEventArgs> ChildIndexChanged