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.

Code in new version required

Thread ID:

Created:

Updated:

Platform:

Replies:

61705 May 31,2007 04:01 AM May 31,2007 07:59 AM Windows Forms 1
loading
Tags: Diagram
Faheem Rauf
Asked On May 31, 2007 04:01 AM

Hi, I want to convert the following function into new syncfusion verion v.5.1.


void CreateLink(symbol SourceNode , symbol TargetNode)
{
LinkCmd objLinkCmd = new LinkCmd();
objNodeLink.LineBridgingEnabled = true;
objNodeLink.LineRoutingEnabled = true;
objLinkCmd.Link = objNodeLink;
objLinkCmd.SourcePort = SourceNode.leftport;
objLinkCmd.TargetPort = TargetNode.leftport;
this.objLNADiagramControl.Controller.ExecuteCommand(objLinkCmd);
}

Please guide me. I will be thankful to you.

Regards,

Meera Fathima [Syncfusion]
Replied On May 31, 2007 07:59 AM


Hello Ali,

Please find the below code snippet used in v5.1 to draw link between two nodes.

void CreateLink(MySymbol SourceNode , MySymbol TargetNode)
{
LineConnector line = new LineConnector(SourceNode.PinPoint, TargetNode.PinPoint);
line .LineBridgingEnabled = true;
line .LineRoutingEnabled = true;
this.diagram1.Model.AppendChild(line);

// Make connection between the two nodes and the line connector through its end point.
SourceNode.CentralPort.TryConnect(line.HeadEndPoint);
TargetNode.CentralPort.TryConnect(line.TailEndPoint);
}

Please let me know whether this is helpful to you.

Thanks for your interest in Syncfusion products.

Best Regards,
Meera.

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.

;