Skip to main content
All docs
V26.1
  • DxTreeViewNode.IconUrl Property

    Specifies the TreeView node icon URL.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public string IconUrl { get; set; }

    Property Value

    Type Default Description
    String null

    The TreeView node icon.

    Remarks

    Use the IconUrl property to specify a node icon. The following code snippet assigns icons to TreeView nodes using Icon Library APIs:

    Blazor Treeview - Use the DevExpress Icon Library

    @using DevExpress.Images.Blazor
    
    <DxTreeView>
        <Nodes>
            <DxTreeViewNode Name="Overview"
                            Text="Overview"
                            IconUrl="@Icon.Info" />
            <DxTreeViewNode Name="Editors"
                            Text="Data Editors"
                            IconUrl="@Icon.Editor">
                <Nodes>
                    <DxTreeViewNode Name="Combobox"
                                    Text="Combobox" />
                    <DxTreeViewNode Name="SpinEdit"
                                    Text="Spin Edit" />
                </Nodes>
            </DxTreeViewNode>
            <DxTreeViewNode Name="FormLayout"
                            Text="Form Layout"
                            IconUrl="@Icon.LayoutFree" />
            <DxTreeViewNode Name="TreeView"
                            Text="TreeView"
                            IconUrl="@Icon.TreeView" />
        </Nodes>
    </DxTreeView>
    

    You can also specify the IconCssClass to apply the CSS class to the icon. Refer to the Icons help topic for additional information about icons in DevExpress Blazor components.

    See Also