Hi Gary,
Thanks for using Syncfusion products.
We suggest you to use the diagram’s ‘Group’ class to group the nodes programmatically. Please refer the below code snippet to achieve your requirement.
Here is the code:
[C#]
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 50, 100, 70);
rect.EnableCentralPort = false;
rect.FillStyle.Color = Color.SkyBlue;
rect.FillStyle.Type = FillStyleType.LinearGradient;
Syncfusion.Windows.Forms.Diagram.Ellipse ellp = new Syncfusion.Windows.Forms.Diagram.Ellipse(30, 10, 40, 40);
ellp.EnableCentralPort = false;
ellp.FillStyle.Color = Color.Lime;
ellp.FillStyle.Type = FillStyleType.LinearGradient;
//Grouping Nodes
Group grp = new Group();
grp.AppendChild(rect);
grp.AppendChild(ellp);
diagram1.Model.AppendChild(grp);
Here is the sample:
F102702-1784928933.zipPlease let us know if you have any queries.
Regards,
Amsath Ali. M