HierarchicalExpanderColumn(IColumn, Func<TModel, IEnumerable?>, Expression<Func<TModel, Boolean>>?, Expression<Func<TModel, Boolean>>?) Constructor

Definition

Assembly Avalonia.Controls.TreeDataGrid.dll

Initializes a new instance of the HierarchicalExpanderColumn<TModel> class.

public HierarchicalExpanderColumn(IColumn<TModel> inner, Func<TModel, IEnumerable<TModel>?> childSelector, Expression<Func<TModel, bool>>? hasChildrenSelector = null, Expression<Func<TModel, bool>>? isExpandedSelector = null)

Parameters

inner
IColumn<TModel>

The inner column which defines how the column will be displayed.

childSelector
Func<TModel, IEnumerable<TModel>>

The model children selector.

hasChildrenSelector
Expression<Func<TModel, Boolean>>

A selector which is used to determine whether the model has children without invoking childSelector. This is only needed if the initialization of a node's children is an expensive operation; where that is not true, pass null.

isExpandedSelector
Expression<Func<TModel, Boolean>>

Selects a read/write boolean property which stores the expanded state for the row.