Hi Christian,
My apologies for the delay in getting back to you.
1.You can avoid adding link to your ObjectSymbol Class using following code snippet.
private void diagram1_ConnectionsChanging(object sender, ConnectionCollectionEventArgs evtArgs)
{
if(evtArgs.Connection.SourcePort.Container is MySymbol && this.diagram1.Controller.ActiveTool!=CustomLinkTool)
{
evtArgs.Cancel=true;
}
}
2.The links can be avoided from getting edited using Link.EditStyle.Enabled property(i.e avoid links from moving).
3.To avoid changing paths of link the LineSegmentTool has to be deactivated as shown in the code snippet below,
private void diagram_Controller_ToolActivate(object sender, Syncfusion.Windows.Forms.Diagram.DiagramController.ToolEventArgs evtArgs)
{
if(evtArgs.Tool.Name =="LineSegmentTool" &&this.diagram.SelectionList.First is CustomOrthogonalLink)
{
LineSegmentTool tool = (LineSegmentTool)evtArgs.Tool;
this.diagram.Controller.DeactivateTool(tool);
}
}
Kindly look into attached a sample to get the above points in clear.
Let me know if you have any queries.
Thanks,
Ramya.
Links0.zip