TreeDataGridCellsPresenter Class
Definition
Presents and manages cells within a row of a Avalonia.Controls.TreeDataGrid control.
public class TreeDataGridCellsPresenter
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
| Name | Description |
|---|---|
| TreeDataGridCellsPresenter | No summary available. |
TreeDataGridCellsPresenter Constructor
public TreeDataGridCellsPresenter()
Methods
| Name | Description |
|---|---|
| GetChildIndex | Gets child's actual index in order of the original source. |
| Render | No summary available. |
| TryGetTotalCount | No summary available. |
GetChildIndex Method
Gets child's actual index in order of the original source.
public int GetChildIndex(Avalonia.LogicalTree.ILogical child)
Parameters
child Avalonia.LogicalTree.ILogical
Logical child.
Returns
int
Index or -1 if child was not found.
Render Method
public void Render(Avalonia.Media.DrawingContext context)
Parameters
context Avalonia.Media.DrawingContext
TryGetTotalCount Method
public bool TryGetTotalCount(int& count)
Parameters
count int&
Returns
bool
Properties
| Name | Description |
|---|---|
| FrozenColumnCount | Gets or sets the number of frozen columns. |
| GridLinesVisibility | Gets or sets a value indicating which grid lines are drawn by the presenter. |
| RowIndex | Gets the index of the row that this presenter is currently displaying. |
| Rows | Gets 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.
GridLinesVisibility Property
Gets or sets a value indicating which grid lines are drawn by the presenter.
public Avalonia.Controls.TreeDataGridGridLinesVisibility GridLinesVisibility { get; set; }
Remarks
This property is usually bound to Avalonia.Controls.TreeDataGrid.GridLinesVisibility by the
row control template. Grid lines are drawn using the TreeDataGridLineBrush theme
resource.
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
| Name | Description |
|---|---|
| FrozenColumnCountProperty | Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.FrozenColumnCount property. |
| GridLinesVisibilityProperty | Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.GridLinesVisibility property. |
| RowsProperty | Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.Rows property. |
FrozenColumnCountProperty Field
Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.FrozenColumnCount property.
public Avalonia.StyledProperty<int> FrozenColumnCountProperty
GridLinesVisibilityProperty Field
Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.GridLinesVisibility property.
public Avalonia.StyledProperty<Avalonia.Controls.TreeDataGridGridLinesVisibility> GridLinesVisibilityProperty
RowsProperty Field
Defines the Avalonia.Controls.Primitives.TreeDataGridCellsPresenter.Rows property.
public Avalonia.DirectProperty<Avalonia.Controls.Primitives.TreeDataGridCellsPresenter, Avalonia.Controls.TreeDataGridRows> RowsProperty
Events
| Name | Description |
|---|---|
| ChildIndexChanged | Occurs 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