We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Custom Connector

Hi,

I am very new to Syncfusion Diagrams. I would like to know one thing that it is possible to create a custom connector (that has to act like other connectors) in symbol designer and use in the drawing application?
The connector I want to create is similar to Directed Link but there will one small filled cycle near arrow head and whenever length or size of the link is changed, cycle size has not been changed.


Thanks,

joseph

6 Replies

GM Gowri Manohari D Syncfusion Team August 17, 2009 01:31 PM UTC

Hi Joseph,

Thank you for choosing Syncfusion products.

The requirement which you have mentioned is not possible in symbol designer. Because each symbol in symbol designer is considered as a Group. The normal behaviour of the Group is, while changing size of the parent node, the child node under the group also change.


GM Gowri Manohari D Syncfusion Team August 17, 2009 01:33 PM UTC

Hi Joseph,

Thank you for choosing Syncfusion products.

The requirement which you have mentioned is not possible in symbol designer. Because each symbol in symbol designer is considered as a Group. The normal behavior of the Group is, while changing size of the parent node, the child node under the group also change. So we can achieve your requirement via code not in symbol designer.

Regards,
Gowri


JO Joseph August 18, 2009 01:10 AM UTC

Hi Gowri,

If so, could you please post some sample code? So that I can reference it and get idea what to do.


Thanks,

Joseph


GM Gowri Manohari D Syncfusion Team August 18, 2009 09:17 AM UTC

Hi Joseph,

We can achieve your requirement by changing the LineConnector.HeadDecorator.DecoratorShape or LineConnector.TailDecorator.DecoratorShape as below. There are more number of DecoratorShape's available for our need. Please make use of it.

Syncfusion.Windows.Forms.Diagram.LineConnector ln = new Syncfusion.Windows.Forms.Diagram.LineConnector(PointF.Empty, new PointF(10, 5));
ln.HeadDecorator.DecoratorShape = DecoratorShape.CircleReverseArrow;
rect.CentralPort.TryConnect(ln.HeadEndPoint);
rect1.CentralPort.TryConnect(ln.TailEndPoint);
diagram1.Model.AppendChild(ln);

The above code will create LineConnector with circle head. Circle wont affect when we change the line size.

Regards,
Gowri


JO Joseph August 18, 2009 03:21 PM UTC

Hi Gowri,

Thanks for reply.
But I think DecoratorShape.CircleReverseArrow is combination of small circle and reverse arrow (arrow tail). What I want to create is small circle with forward arrow (arrow head).


Thanks,

joseph


GM Gowri Manohari D Syncfusion Team August 20, 2009 01:51 PM UTC

Hi Joseph,

We cannot create the linetool which one you are expecting because not possible to create more than one symbol without grouping.

Regards,
Gowri

Loader.
Live Chat Icon For mobile
Up arrow icon