Back to Devexpress

DxTreeViewNode.IconUrl Property

blazor-devexpress-dot-blazor-dot-dxtreeviewnode-91832432.md

latest1.9 KB
Original Source

DxTreeViewNode.IconUrl Property

Specifies the URL of the TreeView node’s icon.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
Stringnull

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 `` tag when rendered. You can also specify the IconCssClass to apply the CSS class to the icon.

razor
<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>
css
.my-style {
    width: 16px;
}

See Also

DxTreeViewNode Class

DxTreeViewNode Members

DevExpress.Blazor Namespace