customize the connections in raddiagram

4 posts, 0 answers
  1. al
    al avatar
    19 posts
    Member since:
    Feb 2016

    Posted 17 Aug 2016 Link to this post

    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?

  2. Dinko
    Admin
    Dinko avatar
    239 posts

    Posted 19 Aug 2016 Link to this post

    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.
  3. al
    al avatar
    19 posts
    Member since:
    Feb 2016

    Posted 22 Aug 2016 Link to this post

    it worked very well,

    thank you.

  4. al
    al avatar
    19 posts
    Member since:
    Feb 2016

    Posted 22 Aug 2016 Link to this post

    it worked very well.

    thanks,

Back to Top