Use the TreeNode.ToggleExpandState method to alternate between an expanded and a collapsed state for the node. For example, if the node is collapsed, calling the TreeNode.ToggleExpandState method expands the node, and vice versa.
As an alternative, you can set the TreeNode.Expanded property directly.