Category / Section
Expand/Collapse the children Objects of group Object
1 min read
GroupNode Expand or Collapse
Diagram control have built-in support to expand/collapse the nodes by using Node’s “IsExpanded” property. We can enable/disable the node’s “IsExpanded” property to expand/collapse the child node of the current node. This behavior works fine within the group node too.
The following code illustrates to expand the parent node:
[C#]
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 100, 100); rect.IsExpanded = true;
[VB]
Dim rect As New Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 100, 100) rect.IsExpanded = True
The following code illustrates to collapse the parent node:
[C#]
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 100, 100); rect.IsExpanded = false;
[VB]
Dim rect As New Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 100, 100) rect.IsExpanded = False