The TreeView.ExpandAll method expands all the System.Windows.Forms.TreeNode objects, which includes all the child tree nodes, that are in the System.Windows.Forms.TreeView control.
The state of a System.Windows.Forms.TreeNode persists. For example, suppose that you call the TreeNode.ExpandAll method, and then the individual root tree nodes are collapsed. The child tree nodes have not been collapsed, and will appear in their previously-expanded state when the root tree nodes are expanded again. Calling the TreeView.CollapseAll method ensures that all the tree nodes appear in the collapsed state.