HierarchicalExpanderColumn<TModel> Class
Definition
A column in an Avalonia.Controls.HierarchicalTreeDataGridSource<T> whose cells show an expander to reveal nested data.
public class HierarchicalExpanderColumn<TModel>
Constructors
| Name | Description |
|---|---|
| HierarchicalExpanderColumn<TModel> | No summary available. |
HierarchicalExpanderColumn<TModel> Constructor
public HierarchicalExpanderColumn<TModel>(Avalonia.Controls.Models.TreeDataGrid.IColumn<TModel><TModel> inner, Func<TModel, System.Collections.Generic.IEnumerable<TModel>> childSelector, System.Linq.Expressions.Expression<Func<TModel,bool>> hasChildrenSelector, System.Linq.Expressions.Expression<Func<TModel,bool>> isExpandedSelector)
Parameters
inner Avalonia.Controls.Models.TreeDataGrid.IColumn<TModel><TModel>
childSelector Func<TModel, System.Collections.Generic.IEnumerable<TModel>>
hasChildrenSelector System.Linq.Expressions.Expression<Func<TModel,bool>>
isExpandedSelector System.Linq.Expressions.Expression<Func<TModel,bool>>
Methods
| Name | Description |
|---|---|
| CreateCell | No summary available. |
| GetChildModels | Gets the child models for the specified model. |
| GetComparison | No summary available. |
| HasChildren | Determines whether the specified model has children. |
CreateCell Method
public Avalonia.Controls.Models.TreeDataGrid.ICell CreateCell(Avalonia.Controls.Models.TreeDataGrid.IRow<TModel><TModel> row)
Parameters
row Avalonia.Controls.Models.TreeDataGrid.IRow<TModel><TModel>
Returns
GetChildModels Method
Gets the child models for the specified model.
public System.Collections.Generic.IEnumerable<TModel> GetChildModels(TModel model)
Parameters
model TModel
The parent model.
Returns
System.Collections.Generic.IEnumerable<TModel>
The child models, or null if there are no children.
GetComparison Method
public Comparison<TModel> GetComparison(System.ComponentModel.ListSortDirection direction)
Parameters
direction System.ComponentModel.ListSortDirection
Returns
Comparison<TModel>
HasChildren Method
Determines whether the specified model has children.
public bool HasChildren(TModel model)
Parameters
model TModel
The model.
Returns
bool
True if the model has children; otherwise false.
Properties
| Name | Description |
|---|---|
| ActualWidth | Gets or sets the actual width of the column after measurement. |
| CanUserResize | Gets a value indicating whether the user can resize the column. |
| Header | Gets the column header. |
| Inner | Gets the inner column that is wrapped by this expander column. |
| IsVisible | Gets or sets a value indicating whether the column is visible. |
| SortDirection | Gets or sets the sort direction indicator that will be displayed on the column. |
| Tag | Gets or sets a user-defined object attached to the column. |
| Width | Gets the width of the column. |
ActualWidth Property
Gets or sets the actual width of the column after measurement.
public double ActualWidth { get; set; }
CanUserResize Property
Gets a value indicating whether the user can resize the column.
public Nullable<bool> CanUserResize { get; set; }
Header Property
Gets the column header.
public object Header { get; set; }
Inner Property
Gets the inner column that is wrapped by this expander column.
public Avalonia.Controls.Models.TreeDataGrid.IColumn<TModel><TModel> Inner { get; set; }
IsVisible Property
Gets or sets a value indicating whether the column is visible.
public bool IsVisible { get; set; }
Remarks
When set to false, the column header and cells will not be rendered and the column will not contribute to layout calculations.
SortDirection Property
Gets or sets the sort direction indicator that will be displayed on the column.
public Nullable<System.ComponentModel.ListSortDirection> SortDirection { get; set; }
Remarks
Note that changing this property does not change the sorting of the data, it is only used to display a sort direction indicator. To sort data according to a column use Avalonia.Controls.ITreeDataGridSource.SortBy(Avalonia.Controls.Models.TreeDataGrid.IColumn,System.ComponentModel.ListSortDirection).
Tag Property
Gets or sets a user-defined object attached to the column.
public object Tag { get; set; }
Width Property
Gets the width of the column.
public Avalonia.Controls.GridLength Width { get; set; }
Remarks
To set the column width use Avalonia.Controls.Models.TreeDataGrid.IColumns.SetColumnWidth(int,Avalonia.Controls.GridLength).
Events
| Name | Description |
|---|---|
| PropertyChanged | Occurs when a property value changes. Inherited from NotifyingBase. |