Use the TreeNode.CollapseAll method to conveniently collapse the current node and all its child nodes.
As an alternative, you can also set the TreeNode.Expanded property of the current node and each of its child nodes to false.
To collapse only the current node, consider using the TreeNode.Collapse method.
TreeView.CollapseAll will collapse all the nodes in the entire tree.