How to custom the diagram connection that contains few connector.

9 posts, 1 answers
  1. William
    William avatar
    7 posts
    Member since:
    Aug 2014

    Posted 25 Aug 2014 Link to this post

    Hey, Guys
    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
  2. Fredrik
    Fredrik avatar
    6 posts
    Member since:
    Aug 2014

    Posted 26 Aug 2014 Link to this post

    Not shure if i understand you correctly william but i think we have the same question.
    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 ?
  3. UI for WPF is Visual Studio 2017 Ready
  4. William
    William avatar
    7 posts
    Member since:
    Aug 2014

    Posted 27 Aug 2014 in reply to Fredrik Link to this post

    Hi, Fredrik
    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
  5. William
    William avatar
    7 posts
    Member since:
    Aug 2014

    Posted 27 Aug 2014 in reply to Fredrik Link to this post

    I Think your issue is not that much same with mine. I Think you can try to fetch all connectors' coordinate of All RadDiagramShape Class in the RadDiagram. You can write some code in RadDiagram Class's Event (the event is itemschanged(sender, args) ) to programatically connect the nearby connector. 
  6. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 28 Aug 2014 Link to this post

    Hello guys,

    @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
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  7. Kevin
    Kevin avatar
    13 posts
    Member since:
    Dec 2012

    Posted 08 Nov 2014 in reply to Fredrik Link to this post

    How did you go about routing your connections?  I'm trying to design an application that behaves just like a schematic capture program, meaning when the user clicks on a shape's connector, it makes the connection and draws a line until they click again, which creates a point and allows the line to pivot 90 degrees and then make a connection to another shape (or another point).

    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,
  8. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 13 Nov 2014 Link to this post

    Hi Brent,

    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.

     
  9. Kevin
    Kevin avatar
    13 posts
    Member since:
    Dec 2012

    Posted 21 Nov 2014 in reply to Pavel R. Pavlov Link to this post

    Hi Pavel,

    Were you able to find anything?  I'm thinking I need an orthogonal router.
  10. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 26 Nov 2014 Link to this post

    Hi Brent,

    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.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready