TreeViewItem.ExpandSubtree Method ()
.NET Framework 4.6 and 4.5
PresentationFramework (in PresentationFramework.dll)
public void ExpandSubtree()
The following examples show how to find the selected TreeViewItem and expand it and all of it child items. The following XAML creates a TreeView and populates it with some data.
The following code traverses the TreeView to find the selected TreeViewItem and then calls ExpandSubtree to display all child items of the selected TreeViewItem.
Return to top
Available since 4.0