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

Сoordinates of the connection

3 Answers 115 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Svyatoslav
Top achievements
Rank 1
Svyatoslav asked on 07 Mar 2017, 06:24 AM
Hello. Could you tell how to catch the coordinates of the connection Shape-Shape? For example, a Shape which has 3 inputs, the user connects the inputs and we need to know what exactly the entrance was summed up connection

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Mar 2017, 09:42 AM
Hello Svyatoslav,

I am not sure what you mean by the following part "we need to know what exactly the entrance was summed up connection". Can you tell me what you have in mind when saying that the entrance is a summed up connection.

Also, you can check the following features from the diagram's API.
  • RadDiagramConnection: Bounds and Position properties. The Bounds properties holds the rectangle boundaries of the connections. The top of the rectangle is determined by the higher connection end. The bottom is determined by the lower connection end. The right and left of the rectangle are determined by the most left and most right positioned connection ends. The Position property contains the top left position of the rectangle boundaries of the connection.

  • RadDiagramConnection: StartPoint and EndPoint properties.They hold the start and end positions of the connection. Those are the positions where the connection is attached to the shapes.

  • RadDiagramShape: IncomingLinks and OutgoingLinks collections. They contain the connections that starts from the corresponding shape (the shape is source of the connection) and comes to it (the shape is target of the connection).

  • RadDiagram: ManipulationStarted and ManupulationCompleted events. They are fired when a connection manipulation action is executed. For example, a new connection is started from a shape connector. Or when an existing shape is moved from one connector to another.

I hope this helps.

Regards,
Martin
Telerik by Progress
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
Svyatoslav
Top achievements
Rank 1
answered on 09 Mar 2017, 03:17 PM
I mean, some shape ( as an example ) have some many сonnection, user can connect them in any order, e.g. to first connect to 2 and then to 1, and we can't know which connection was summed up connection, we can learn only connections order. But to properly build the program we must define precisely the pin that the user finished the connection
0
Martin Ivanov
Telerik team
answered on 14 Mar 2017, 11:19 AM
Hello Svyatoslav,

There is no built-in support for this in the diagram control. In order to achieve it you can implement custom mechanism that stores information about the connections. For example, you can store the related connections in a dictionary or some other type of collection. Or you can mark them with a with a custom property and get them by key later. 

Regards,
Martin
Telerik by Progress
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
Svyatoslav
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Svyatoslav
Top achievements
Rank 1
Share this question
or