Back to Devexpress

TreeList.NodeHtmlTemplate Property

windowsforms-devexpress-dot-xtratreelist-dot-treelist.md

latest2.2 KB
Original Source

TreeList.NodeHtmlTemplate Property

Specifies the default HTML-CSS template for nodes.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public HtmlTemplate NodeHtmlTemplate { get; }
vb
Public ReadOnly Property NodeHtmlTemplate As HtmlTemplate

Property Value

TypeDescription
HtmlTemplate

The default HTML-CSS template for nodes.

|

Remarks

The WinForms TreeList control supports HTML/CSS templates and allows you to generate unique custom layouts for nodes. Use the NodeHtmlTemplate property to specify the default HTML-CSS template for nodes.

You can also create different HTML templates for nodes, add them to the HtmlTemplates collection, and handle the QueryNodeTemplate event to assign the templates to nodes based on a condition.

Run Demo: HTML/CSS Templates in TreeList

See Also

HtmlTemplates

QueryNodeTemplate

CustomizeNodeTemplate

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace