Back to Devexpress

TreeListView.ExpandAllNodes() Method

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

latest3.7 KB
Original Source

TreeListView.ExpandAllNodes() Method

Expands all nodes.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public void ExpandAllNodes()
vb
Public Sub ExpandAllNodes

Remarks

To expand a node, use the TreeListView.ExpandNode method. To collapse the specified node or all nodes, use the TreeListView.CollapseNode or TreeListView.CollapseAllNodes method, respectively.

Set the TreeListView.AutoExpandAllNodes property to true to expand all nodes automatically when the TreeListView is being loaded.

Tip

Topic : Expand and Collapse Nodes

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

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-tree-list-generate-node-summaries-from-collection/CS/TreeList_DataBinding/MainWindow.xaml.cs#L16

csharp
InitializeComponent();
    treeListView1.ExpandAllNodes();
}

wpf-tree-list-display-node-summaries/CS/TreeList_DataBinding/MainWindow.xaml.cs#L12

csharp
InitializeComponent();
treeListView1.ExpandAllNodes();

wpf-tree-list-generate-node-summaries-from-collection/VB/TreeList_DataBinding/MainWindow.xaml.vb#L18

vb
InitializeComponent()
    treeListView1.ExpandAllNodes()
End Sub

wpf-tree-list-display-node-summaries/VB/TreeList_DataBinding/MainWindow.xaml.vb#L14

vb
Me.InitializeComponent()
Me.treeListView1.ExpandAllNodes()
Me.treeListView1.NodeSummary.Add(New TreeListSummaryItem() With {.FieldName = "Statistics", .SummaryType = SummaryItemType.Max, .ShowInColumn = "Department"})

See Also

Expand and Collapse Nodes

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace