Alex Rivera | Logout

How to expand all nodes of a WPF treeview in code behind?

Asked 2009-12-14T18:30:34.150
18

I might be suffering of Monday's dumbness, but I can't find a nice way of expanding all treeview nodes after I've added them in code behind (something like treeView.ExpandAll()).

Any quick help?

Edit
Report

1 Answer

2

WPF doesn't have an ExpandAll method. You'll need to loop through and set the property on each node.

See this question or this blog post.

answered 2009-12-14T18:33:32.163

Your Answer