Hello Josef,
Thanks for the code snippet. It seems the group1 and group2 are not getting added to the diagram model. Please try with the below code snippet and let me know if you still have any issues.
Group g0 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r0 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 400, 400, MeasureUnits.Pixel);
r0.FillStyle.Color = Color.White;
g0.AppendChild(r0);
diagram1.Model.AppendChild(g0);
Group g1 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r1 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 100, 100, MeasureUnits.Pixel);
r1.FillStyle.Color = Color.Red;
g1.AppendChild(r1);
g0.AppendChild(g1);
diagram1.Model.AppendChild(g1);
Group g2 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r2 = new Syncfusion.Windows.Forms.Diagram.Rectangle(200, 10, 100, 100, MeasureUnits.Pixel);
r2.FillStyle.Color = Color.Yellow;
g2.AppendChild(r2);
g0.AppendChild(g2);
diagram1.Model.AppendChild(g2);
LineConnector l1 = new LineConnector(new PointF(0, 0), new PointF(1, 0));
//diagram1.Model.AppendChild(l1); // line connector is visible
g0.AppendChild(l1); // PROBLEM: line connector is not visible
g1.CentralPort.TryConnect(l1.TailEndPoint);
g2.CentralPort.TryConnect(l1.HeadEndPoint);
Please do let me know if you have any technical questions or I can be of any other assistance. We will be glad to assist you.
Best Regards,
Meera.
Syncfusion, Inc.
http://www.syncfusion.com/