System.Windows.Forms.TreeNode.Collapse Method

Collapses the System.Windows.Forms.TreeNode and optionally collapses its children.

Syntax

public void Collapse (bool ignoreChildren)

Parameters

ignoreChildren
true to leave the child nodes in their current state; false to collapse the child nodes.

Remarks

Use the TreeNode.Collapse(bool) method, passing true, when you want to collapse a node but leave its child nodes in their expanded state.

Requirements

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