Skip to main content

DxTreeViewNode.IconUrl Property

Specifies the URL of the TreeView node’s icon.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Default Description
String null

The URL of the TreeView node’s icon.

Remarks

Use the IconUrl property to specify the path to the TreeView node’s icon. The specified image is wrapped with the <img> tag when rendered. You can also specify the IconCssClass to apply the CSS class to the icon.

<style>
    .my-style {
        width: 16px;
    }
</style>

<DxTreeView>
    <Nodes>
        <DxTreeViewNode Name="Overview" 
                        Text="Overview" 
                        NavigateUrl="https://demos.devexpress.com/blazor/"
                        IconUrl="images/Info.svg"
                        IconCssClass="my-style" />
        <DxTreeViewNode Name="Editors" Text="Data Editors" />
        <DxTreeViewNode Name="FormLayout" Text="Form Layout" NavigateUrl="https://demos.devexpress.com/blazor/FormLayout" />
        <DxTreeViewNode Name="TreeView" Text="TreeView" NavigateUrl="https://demos.devexpress.com/blazor/TreeView" />
    </Nodes>
</DxTreeView>

Path to the TreeView Icon

See Also