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.

diagram lineconnector question

Thread ID:

Created:

Updated:

Platform:

Replies:

103178 Apr 9,2012 03:24 PM May 3,2012 08:59 AM Windows Forms 9
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On April 9, 2012 03:24 PM

Has anyone figured out how to create a lineconnector whose path can be controlled by adjusting control points which force the connector to follow a bezier curved path?


Senthil Kumar M [Syncfusion]
Replied On April 12, 2012 02:03 AM

Hi Jan Stiff,

Thanks for using Syncfusion products.

Diagram control has BezierCurve which act as a connector. We suggest you to use BezierCurve for your requirement.
Please refer the below code snippet:

[C#]

//Create a node
Ellipse ellipse1 = new Ellipse(0, 50, 100, 50);
Ellipse ellipse2 = new Ellipse(250, 50, 100, 50);

// Add node to diagram control
diagram1.Model.AppendChild(ellipse1);
diagram1.Model.AppendChild(ellipse2);

//Create a bezierCurve
BezierCurve bezierCurve = new BezierCurve(new PointF[] { new PointF(0, 60), new PointF(28, 6), new PointF(72, 0), new PointF(100, 60), new PointF(124, 6), new PointF(144, 0), new PointF(200, 60), new PointF(248, 6), new PointF(288, 0), new PointF(320, 60) });
diagram1.Model.AppendChild(bezierCurve);

//Connect a Nodes.
ellipse1.CentralPort.TryConnect(bezierCurve.TailEndPoint);
ellipse2.CentralPort.TryConnect(bezierCurve.HeadEndPoint);


You can draw BezierCurve by activating the BezierTool .
Please refer the below code snippet :

[C#]
//To activate a BezierTool
diagram1.Controller.ActivateTool("BezierTool");


Here is the sample, for your reference.
http://www.syncfusion.com/downloads/Support/DirectTrac/92627/103178Sample612108459.zip

Please let me know, if any concerns

Regards,

Senthilkumar.M



Administrator [Syncfusion]
Replied On April 12, 2012 05:46 AM

Is there anyway to provide the user the ability to alter where the control points are so that he can change the path of the link as needed at runtime?


Administrator [Syncfusion]
Replied On April 12, 2012 05:52 AM

Also, is there a way to enable line-bridging, etc. such as with other types of connectors?


Administrator [Syncfusion]
Replied On April 12, 2012 06:25 AM

Sorry for the disjointed updates. I'm trying to do this while taking care of other things.

Is there a way to motivate Syncfusion to produce complete documentation sets? I am using version 8.2.0.18 which supports the BezierCurve, but it is not mentioned anywhere in the documentation for the libraries which are supplied with this version. This lack of documentation makes it very difficult to use the libraries effectively. Has anyone else had this problem?



Senthil Kumar M [Syncfusion]
Replied On April 17, 2012 12:34 AM

Hi Jan Stiff,

Thanks for the update.

1.You can get the controls points handle of Node by setting the DefaultHandleEditMode property of Node to Vertex. So that you can change the control points at run time.
Please refer the below code snippet :


[C#]

//Create a BezierCurve
BezierCurve bezierCurve = new BezierCurve(new PointF[] { new PointF(0, 60), new PointF(28, 6), new PointF(72, 0), new PointF(100, 60), new PointF(124, 6), new PointF(144, 0), new PointF(200, 60), new PointF(248, 6), new PointF(288, 0), new PointF(320, 60) });
diagram1.Model.AppendChild(bezierCurve);
bezierCurve.EditStyle.DefaultHandleEditMode = HandleEditMode.Vertex;




2. Diagram control supports line-bridging. You can use LineBridgingEnabled property of diagram control for your requirement.
You can also change the line-bridging size by using the LineBridgingSize property of diagram control.
You can also change the style of line bridging by using the BridgeStyle property of diagram control.

Please refer the below code snippet :


[C#]
//Enable LineBridging in diagram.
diagram1.Model.LineBridgingEnabled = true;
//Change the LineBridging size.
diagram1.Model.LineBridgeSize = 20;
//Change the LineBridging style.
diagram1.Model.BridgeStyle = BridgeStyle.Square;



Please refer the UG link for more details.
http://help.syncfusion.com/Ug_101/User%20Interface/Windows%20Forms/Diagram/default.htm#!Documents/421linebridging.htm

3. We regret to inform you that documentation does not have details about BezierCurve. We will improve our document in future.
Here is the UG link for more details in the documentation.
http://help.syncfusion.com/resources/Ug_101/User%20Interface/Windows%20Forms/Diagram

Here is the sample, for your reference.
http://www.syncfusion.com/downloads/Support/DirectTrac/92627/103178Sample-1903436163.zip

Please let me know,if any concerns

Regards,

Senthilkumar.M




Administrator [Syncfusion]
Replied On April 17, 2012 03:12 AM

Thank you. Your response for implementing the control points works, but you example for implementing the line bridging does not.I have no idea why, but I guess I will just have to live with it. Line bridging works for LineConnector and PolylineConnector. So maybe I am just stuck using them.


Amsath Ali M [Syncfusion]
Replied On April 24, 2012 03:41 PM

Hi Jan,

Thanks for the update.

We are happy to hear that the issue has been resolved by yourself.
Please let us know if you further assistance on this. We would be happy to help you out.

Regards,
Amsath Ali. M




Administrator [Syncfusion]
Replied On April 30, 2012 04:12 AM

Thank you for the response. If anyone ever figures out how to get the line bridging to work with the bezier curves, hopefully they will update this thread.


Amsath Ali M [Syncfusion]
Replied On May 3, 2012 08:59 AM

Hi Jan,

Thanks for your update.

Currently we don’t have an option for adding LineBridges to Bezier curves. For this, please create a DT incident for your query so that we can update the patch for this feature.

You can create the DT incident from the following link.
<http://www.syncfusion.com/account/dashboard>

In the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.

Please let us know if you have any queries.

Regards,
Amsath Ali. M





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.

;