DxTreeView.IconCssClassExpression Property
Specifies an expression that returns the name of a CSS class applied to a node’s icon.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public Expression<Func<object, string>> IconCssClassExpression { get; set; }
Property Value
Type | Description |
---|---|
Expression<Func<Object, String>> | A lambda expression that returns the name of a CSS. |
Remarks
When the DxTreeView component is bound to a data source, use the IconCssClassExpression property to specify the lambda expression that returns the name of a CSS class applied to a node’s icon.
<DxTreeView Data="@ChemicalElements"
TextExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Title)"
NameExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Name)"
NavigateUrlExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Url)"
IconCssClassExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Icon)"
ChildrenExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Groups)">
</DxTreeView>
Online Demo
TreeView - Bind to Hierarchical Data
See Also