Back to Devexpress

TreeListView.Nodes Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-ad7e4b3a.md

latest4.2 KB
Original Source

TreeListView.Nodes Property

Gets the collection of root nodes.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(false)]
public TreeListNodeCollection Nodes { get; }
vb
<Browsable(False)>
Public ReadOnly Property Nodes As TreeListNodeCollection

Property Value

TypeDescription
TreeListNodeCollection

A TreeListNodeCollection object that contains root nodes.

|

Remarks

To iterate through the nodes, do the following.

To learn more, see Nodes and Binding to Self-Referential Data Structure.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Nodes property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/BindableExpandingBehavior.cs#L40

csharp
var grid = this.AssociatedObject;
this.AttachItems((grid.View as TreeListView).Nodes);

wpf-treelist-iterate-through-nodes-with-the-treelistnodeiterator/CS/WpfApplication1/MainWindow.xaml.cs#L12

csharp
void SmartExpandNodes(int minChildCount) {
    TreeListNodeIterator nodeIterator = new TreeListNodeIterator(view.Nodes, true);
    while (nodeIterator.MoveNext())

wpf-grid-sync-isnodeexpanded-with-view-model/VB/DevExpress.Example04/BindableExpandingBehavior.vb#L45

vb
Dim grid = Me.AssociatedObject
Me.AttachItems((TryCast(grid.View, TreeListView)).Nodes)

See Also

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace