TreeDataGridColumnHeadersPresenter Class
Definition
Presents and manages column headers in a Avalonia.Controls.TreeDataGrid control.
public class TreeDataGridColumnHeadersPresenter
Remarks
TreeDataGridColumnHeadersPresenter is responsible for creating, recycling, and arranging column headers horizontally at the top of a TreeDataGrid. It handles the virtualization of column headers, ensuring that only visible headers are realized in the visual tree to improve performance.
This presenter coordinates with the Avalonia.Controls.TreeDataGridColumns collection to manage column widths, measurement, and layout. It also handles column resizing by committing the actual column widths during arrangement.
Constructors
| Name | Description |
|---|---|
| TreeDataGridColumnHeadersPresenter | No summary available. |
TreeDataGridColumnHeadersPresenter Constructor
public TreeDataGridColumnHeadersPresenter()
Methods
| Name | Description |
|---|---|
| GetChildIndex | Gets the index of a logical child element. |
| TryGetTotalCount | No summary available. |
GetChildIndex Method
Gets the index of a logical child element.
public int GetChildIndex(Avalonia.LogicalTree.ILogical child)
Parameters
child Avalonia.LogicalTree.ILogical
The logical child element.
Returns
int
The index of the child element, or -1 if the element is not a column header or is not found.
Remarks
This method is part of the Avalonia.LogicalTree.IChildIndexProvider interface implementation, which allows the presenter to provide indices for its logical children.
TryGetTotalCount Method
public bool TryGetTotalCount(int& count)
Parameters
count int&
Returns
bool
Properties
| Name | Description |
|---|---|
| FrozenColumnCount | Gets or sets the number of frozen columns. |
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.
Fields
| Name | Description |
|---|---|
| FrozenColumnCountProperty | Defines the Avalonia.Controls.Primitives.TreeDataGridColumnHeadersPresenter.FrozenColumnCount property. |
FrozenColumnCountProperty Field
Defines the Avalonia.Controls.Primitives.TreeDataGridColumnHeadersPresenter.FrozenColumnCount property.
public Avalonia.StyledProperty<int> FrozenColumnCountProperty
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
Remarks
This event is raised when column headers are realized, unrealized, or when their indices change due to column insertions or removals.