AutoExpand treeview in WPF

Viewed 40900

Is there a way to automatically expand all nodes from a treeview in WPF? I searched and didn't even find an expand function in the treeview property.

Thanks

5 Answers

Another programmatical way to manipulate full expansion of tree items, maybe via c# code, is using the TreeViewItem.ExpandSubTree() command on a root node.

private void ExpandFirstRootNode()
{
   TreeViewControl.Items[0].ExpandSubtree();
}
Related