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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add new Connection event

Thread ID:

Created:

Updated:

Platform:

Replies:

91721 Nov 30,2009 12:52 PM UTC Dec 1,2009 12:47 PM UTC WinForms 3
loading
Tags: Diagram
Domenico Mozzone
Asked On November 30, 2009 12:52 PM UTC

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
domenico

Dinesh M [Syncfusion]
Replied On November 30, 2009 03:43 PM UTC

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)
{

}
}
}

Regards,
Dinesh

Domenico Mozzone
Replied On December 1, 2009 08:15 AM UTC

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

Dinesh M [Syncfusion]
Replied On December 1, 2009 12:47 PM UTC

Hi Domenico,

Thanks for the update.

Regards,
Dinesh

CONFIRMATION

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.

Warning Icon 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.Close Icon

;