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.

LinkCmd in V5

Thread ID:

Created:

Updated:

Platform:

Replies:

64309 Jul 18,2007 05:18 AM Jul 18,2007 11:19 AM Windows Forms 1
loading
Tags: Diagram
Faheem Rauf
Asked On July 18, 2007 05:18 AM

Hi, Can you please guide me how can I connect two node. In last version there was LinkCmd that can connect two node. How I can get same functionality in V5. I will be thankful to you. I am using Version 5.1.0.51
Regards


J.Nagarajan [Syncfusion]
Replied On July 18, 2007 11:19 AM

Hi Ali,

Thanks for your interest in Syncfusion product. The LinkCmd class has been removed and use lineConnector or OrthogonalConnector instead. Please refer to the following code snippet

//Create NodeCollection to all nodes.
NodeCollection symbols = new NodeCollection();

//Create CustomNode1
MySymbol symbol1 = new MySymbol();
symbol1.PinPoint = new PointF(100 + symbol1.PinPointOffset.Width, 10 + symbol1.PinPointOffset.Height);
symbol1.EnableCentralPort = true;
symbols.Add(symbol1);

//Create CustomNode2
MySymbol symbol2 = new MySymbol();
symbol2.PinPoint = new PointF(300, 200);
symbol2.EnableCentralPort = true;
symbols.Add(symbol2);

int position = 0;

//Create OrthogonalConnector
OrthogonalConnector line = new OrthogonalConnector(symbol1.PinPoint, symbol2.PinPoint);

symbols.Add(line);

this.diagram.Model.AppendChildren(symbols, out position);

symbol1.CentralPort.TryConnect(line.HeadEndPoint);
symbol2.CentralPort.TryConnect(line.TailEndPoint);

this.diagram.Model.EndUpdate();

I have attached the sample that demonstrates this completely. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F64323/main.htm

Please refer to the sample and let me know if you have any questions.

Thanks,
Nagaraj

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.

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.

;