BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Hemant,
Thanks for using Syncfusion product.
We suggest you to use connector’s “FromNode” and “ToNode” properties in order to get the source and target node’s values respectively and add the values to the custom node’s “PropertyBag”. Please refer the below code snippet and sample for your references.
Here is the code snippet:
[C#]
Syncfusion.Windows.Forms.Diagram.Ellipse ellipse = new Syncfusion.Windows.Forms.Diagram.Ellipse(10, 10, 100, 100);
ellipse.Name = "Ellipse";
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(150, 150, 100, 100);
rect.Name = "Rectangle";
diagram1.Model.AppendChild(ellipse);
diagram1.Model.AppendChild(rect);
OrgLineConnector con = new OrgLineConnector(new PointF(0, 0), new PointF(100, 100));
ellipse.CentralPort.TryConnect(con.HeadEndPoint);
rect.CentralPort.TryConnect(con.TailEndPoint);
diagram1.Model.AppendChild(con);
Syncfusion.Windows.Forms.Diagram.Rectangle rect2 = new Syncfusion.Windows.Forms.Diagram.Rectangle(300, 300, 100, 100);
rect2.PropertyBag.Add("Rectangle", (con.FromNode as Node).Name);
rect2.PropertyBag.Add("Ellipse", (con.ToNode as Node).Name);
Here is the Sample:
Please let us know if any concern.
Regards,
Naganathan K G