Expand/Collapse the children Objects of group Object
GroupNode Expand or Collapse
Diagram control has built-in support to expand/collapse the nodes by using the node’s "IsExpanded" property. We can enable/disable the node’s "IsExpanded" property to expand/collapse the child nodes of the current node. This behavior works fine within the group node as well.
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
Conclusion
I hope you enjoyed learning about how to expand/Collapse the children Objects of group Object.
You can refer to our WinForms Diagram feature tour page to learn about its other groundbreaking feature representations. You can also explore our WinForms Diagram documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!