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

Creating loop - a link with source node = target node

3 Answers 91 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jindřich
Top achievements
Rank 1
Jindřich asked on 04 Dec 2017, 10:59 AM

Hi,

I am trying to create a loop - a link where source node and target node are the same node. I am able to create a loop from code, but it does not behave well. For example when I try to drag connection end from one connector to some other connector on the same node, the end of the link doesn't attach to the connector, it is left unattached when dropped.

When I try to create new loop by dragging from one connector to another connector on the same node, the node and it's connectors don't seem to be active and I cannot create a link this way.

Is there some support for loops in RadDiagram or do you have some suggestions how to achieve this behavior?

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 06 Dec 2017, 08:14 AM
Hi Jindřich,

Please find an isolated project and a sample captured video of a test based on your scenarios. In the video, we first programmatically, on a button click, create a connection, then we move its source successfully to other connector. As a last step, we create brand new connection by dragging from connector and dropping to other. We are not able to reproduce the mentioned issues with R3 2017 version of our binaries. Could you please check out the project and the video and let us know if we have missed something. Please also feel free to modify the project and send it back to us. Thank you in advance for your cooperation.

Regards,
Petar Mladenov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Jindřich
Top achievements
Rank 1
answered on 06 Dec 2017, 03:02 PM
Thank you, the problem was in old version of binaries (2014.2.729.40). I tried the current version from trial and it works well.
0
Petar Mladenov
Telerik team
answered on 07 Dec 2017, 07:01 AM
Hello Jindřich,

I am glad to know your latest binaries solve your issues. I just wanted to add some notes regarding the connections that have equal source and target. We call *reflexive*, a connection which starts and ends in a single connector of a given shape. To create such, you can simply click on a connector and this will add connection in a triangle form. Also, you can add your own IRouter to route such reflexive connections. By default the ReflexiveRouter is used:

this.diagram.RoutingService.ReflexiveRouter = new ReflexiveRouter();


Regards,
Petar Mladenov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Diagram
Asked by
Jindřich
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Jindřich
Top achievements
Rank 1
Share this question
or