This tough to describe. In Brief, I want the RadDiagram has the circuit diagram feature like the attached picture. The certain connector can connect to line (or named as RadDiagram connection). Is any approaching to this feature?
Thanks a lot, By William
11 Answers, 1 is accepted
I am currently building an application that makes a circuit diagram from components. Some of the components attach directly to each other whilst others connect via cables. I found this in the documenation that seems to answer the question about how to make custom connectors
http://www.telerik.com/help/wpf/raddiagram-features-custom-connectors.html
however i have one more question.
Is connecting component to component directly possible ? How would i detect when two connectors are touching and make a connection programatically when this occurs ?
Actually, I have read the docu of custom connector in the RadDiagramShape Class, and My Program has already used this feature. But I can't custom connector in the RadDiagramConnection Class. I ideally approaching to this issue is that an Event (add some Connector automatically while I drag a line from certain connector to a DiagramConnection) will be activate when the mouse is near the DiagramConnection.
By William
@William,
Thank you for providing us with a picture of your requirements. It helped us to better understand what you need to achieve. Unfortunately, creating a RadDiagramConnector in the middle of a RadDiagramConnection is not possible.
However, you can achieve the same by using a customized RadDiagramShape. That shape will contain no geometry (or the geometry can define the look of a connection point), it will have small fixed size (e.g. 10x10 pixels) and will define only one connector in the middle. This will allow you to position the shape where you need to connect other connections and use that only connector.
@Fredrik
We understand your requirement for connecting two RadDiagramShapes. Unfortunately, the RadDiagramConnectors are designed to be used in combination with RadDiagramConnections. This means that directly connecting two RadDiagramConnectors is not supported.
As for your second question, you cannot detect if two connectors are near one another, out of the box. The reason for that is the fact that the connectors of only one shape are visualized at a time.
Hence, in order to achieve your requirement you will need to implement big customizations into the RadDiagram.
One, possible approach which will be easier to achieve is that you can always connect two shapes that are positioned so that the space between them is less than 10 pixels.
Regards,
Pavel R. Pavlov
Telerik
It appears the Path Tool is close to what I want, but I want it to draw a connection and not a shape. Any thoughts on how to achieve this? Thanks,
I understand your requirement. I have seen and worked with such applications. I will search through our history and will try to find such application. If I find one I will attach it to this thread.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Were you able to find anything? I'm thinking I need an orthogonal router.
I searched through our resources but I could not find any ready to run application that is close to your requirement.
However, you can take advantage of the custom tools of the RadDiagram to implement your customization. You can create a custom connection tool that will draw the connections for you as you require. As a startup project you can refer to our SDK project. It demonstrates how a custom tool can be created. Based on it you can start to create the required tool.
I hope this will help you.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi,
are there any news to this topic? Is it already possible to route from Connector to Connector? For Example if i have a Custom Shape with 3 custom input Connectors on the left side and 3 custom output Connectors on the right side, can i somehow route from Shape1 output1 to Shape2 input1.
If it is not possible what would be the best workaround? Use a Shape with Shapes instead of a Shape with Connectors(replace every Connector with a small Shape) so that i can use the build in routing algorithm. Should i create my own routing algorithm based on some events? Any other possible ways?
Regards
Robert
For better Understanding of my Application i added some Screenshots of the current Situation.
The first picture shows how it should look like(it looks like this if i arrange the shapes in a good way)
The second and third picture are how the elements behave at the moment.