Contains extension methods for TreeNode.
Methods
public static TreeNode Collapse(TreeNode node)
Collapses the tree.
Parameters:
node (TreeNode)The tree node.
Returns:
The same instance so that multiple calls can be chained.
public static TreeNode Expand(TreeNode node)
Expands the tree.
Parameters:
node (TreeNode)The tree node.
Returns:
The same instance so that multiple calls can be chained.
public static TreeNode Expand(TreeNode node, bool expand)
Sets whether or not the tree node should be expanded.
Parameters:
node (TreeNode)The tree node.
expand (bool)Whether or not the tree node should be expanded.
Returns:
The same instance so that multiple calls can be chained.