This is a migrated thread and some comments may be shown as answers.

customize the connections in raddiagram

3 Answers 195 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
al
Top achievements
Rank 1
al asked on 17 Aug 2016, 10:15 AM

hi dear developers,

I need to customize the connections in raddiagram just like the attached shape. i reviewed the forum and only find an example that change the color of the connection but i need a more complex connection as it is attached. how can i do that?

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 19 Aug 2016, 09:51 AM
Hi,

Let us start with that the RadDiagramConnection doesn't have built-in functionality which you can use to change its appearance as showed in the attached picture.

A possible approach which you can use is to take advantage of the  (object) Content property of the RadDiagramConnection and place for example a Rectangle. You can take a look at the SetContent section in the Connections help article in our documentation where this property is further described. Then you can subscribe to the SizeChanged event of the connection and manually calculate its rotate angle and its width. This way you can reposition the rectangle on the connection when the connection position changed.

For your convenience, we have created a sample project demonstrating the explained above approach. Keep in mind that this custom code is just a suggestion and we cannot guarantee that it will work properly in all expected scenarios. You can test and modify the project to fit the desired scenario. 

Regards,
Dinko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
al
Top achievements
Rank 1
answered on 22 Aug 2016, 02:03 PM

it worked very well,

thank you.

0
al
Top achievements
Rank 1
answered on 22 Aug 2016, 02:04 PM

it worked very well.

thanks,

Tags
Diagram
Asked by
al
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
al
Top achievements
Rank 1
Share this question
or