Hi Kawashima,
If your intention is to programatically add the symbols then you have to customize the Symbol Base class
Here is a code sample demonstrating how this custom symbol (MySymbol) can be created.
public class MySymbol : Symbol
{
public MyRoundRect()
{
public MyRoundRect(string text)
{
Syncfusion.Windows.Forms.Diagram.RoundRect node = new Syncfusion.Windows.Forms.Diagram.RoundRect(0,0,300,100);
node.Width = 150;
node.Height = 70;
node.BorderStyle.ShowBorder = true;
this.AddLabel(text,BoxPosition.Center);
this.Nodes.Add(node);
this.AddLabel(text,BoxPosition.Center);
}
}
//In FormLoad Event
MyRoundRect rrect=new MyRoundRect("100");
rrect.X=50;
rrect.Y=100;
this.diagram1.Model.AppendChild(rrect);
//To Add Link
LinkCmd linkcommand = new LinkCmd();
Link link = new Link(Link.Shapes.OrthogonalLine);
link.LineStyle.LineWidth=3;
link.Labels.Add(new LinkLabel(link, "32757"));
link.Labels[0].BackgroundStyle.Color=Color.White;
linkcommand.Link = link;
// Set up the source and target ports for the link
linkcommand.SourcePort = rect.CenterPort;
linkcommand.TargetPort =rrect.bottomport;
link.EndPoints.FirstEndPointDecorator = new EndPointDecorator(EndPointVisuals.ClosedArrow);
// Execute the command to connect the two symbols
this.diagram1.Controller.ExecuteCommand(linkcommand);
I have attached the sample for your reference. Please refer to it and let me know if you have any questions.
Thanks for using Syncfusion product.
Regards,
Nagaraj
FlowGraphics.zip