Recursively collapse all child nodes of parent node in custom UserControl
问题 I actually have a custom-built UserControl similar to a TreeView. The only thing it's missing is the CollapseAll() method from a TreeView, so I'm looking to either a) find the source code for the CollapseAll method so I can copy it, or b) manually (and recursively) iterate through all the child nodes of a selected node and collapse them. Here is my current collapse method: private void OnNodeCollapsed(TreeNode node) { foreach(FileSystemNode n in node.Nodes) { if(n.NodeType !=