WPF TreeView: Where is the ExpandAll() method

后端 未结 7 2086
抹茶落季
抹茶落季 2020-12-30 19:06

How can I expand all TreeView nodes in WPF? In WinForms there was a ExpandAll() method which does this.

7条回答
  •  天命终不由人
    2020-12-30 19:26

    The WPF TreeView class does not have an ExpandAll method. Thus you'd have to loop through the nodes and set their IsExpanded properties to true.

提交回复
热议问题