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.
Unfortunately, activation email could not send to your email. Please try again.

Add new Connection event

Thread ID:





91721 Nov 30,2009 07:52 AM Dec 1,2009 07:47 AM Windows Forms 3
Tags: Diagram
Domenico Mozzone
Asked On November 30, 2009 07:52 AM

Hi there,
I'm evaluating Syncfusion Diagram Windows and I have a question about the best way to get and event when two nodes have been connected by a connector.
I would like an event which argument(s) that specify newly connected nodes.
I tried

this.diagram1.Model.EventSink.ConnectionsChanged += new CollectionExEventHandler(EventSink_ConnectionsChanged);

but it fires twice, for both connected nodes.

thank you

Dinesh M [Syncfusion]
Replied On November 30, 2009 10:43 AM

Hi Domenico,

Please try the following code and let me know whether it solves your problem. The event occurs twice as there are two connection points for a connector.

diagram1.Model.EventSink.ConnectionsChanged += new CollectionExEventHandler(EventSink_ConnectionsChanged);

void EventSink_ConnectionsChanged(CollectionExEventArgs evtArgs)
if (evtArgs.ChangeType == CollectionExChangeType.Insert)
//NodeCollection nodes = evtArgs.Elements as NodeCollection;
EndPoint conPoint = evtArgs.Element as EndPoint;
ConnectorBase con = conPoint.Container as ConnectorBase;
if (con != null && con.FromNode != null && con.ToNode != null)



Domenico Mozzone
Replied On December 1, 2009 03:15 AM

Hi Dinesh,
thank you very much for you help.
Best Regards

Dinesh M [Syncfusion]
Replied On December 1, 2009 07:47 AM

Hi Domenico,

Thanks for the update.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.