System.Windows.Forms.TreeView.ExpandAll Method

Expands all the tree nodes.

Syntax

public void ExpandAll ()

Remarks

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.

Note:

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.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0