Draw angle' s curve between two or more RadDiagramConnections

4 posts, 0 answers
  1. Ciro
    Ciro avatar
    11 posts
    Member since:
    Nov 2013

    Posted 25 Feb 2014 Link to this post

    Hi,

    I want to implement a feature to draw an angle's curve between two or more raddiagramconnections connected to a RadDiagramShape. I want to get the following behavior :
    -The curve's  visibility is set from a property in the  viewmodel;
    - When  add  or remove connections incoming to the raddiagramshape i want to update the RadDiagram automatically and change  the curve including new RadDiagramConnections or excluding removed RadDiagramConnections from  the path;

    I want to have a result similar to attached images. Is there a simple way to do this? And Could I have a sample solution with this feature or something of similar??


    Thanks
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 28 Feb 2014 Link to this post

    Hi Ciro,

    We understand your custom scenario. Unfortunately, with the current implementation the required behavior is not supported out of the box. Also, we cannot say if that is possible to achieve with the RadDiagram control. It depends on your custom scenario.

    If you need to visualize the curve for limited number of shapes, you can recreate it with a floating Spline connection with three points (StartPoint, EndPoint and MiddlePoint).
    If you need that curve to be fully functional and users to be able to interact with it, there might be difficulties in achieving your requirement.

    However, in both cases we need more detailed specifications on the required behavior (the more detailed they are, the better) to evaluate if it is achievable. Please provide us with more details.

    Regards,
    Pavel R. Pavlov
    Telerik
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ciro
    Ciro avatar
    11 posts
    Member since:
    Nov 2013

    Posted 02 Mar 2014 in reply to Pavel R. Pavlov Link to this post

    Hi,

    first of all thanks for the last answer.
    I want to explain better what I'd like to do:
    I've an ellipse shape with a set of incoming connections like in the attached image in the previous post.
    In this scenario, I want to implement a property binding in the xaml that if it is set to  true,
    the RadDiagram shows a line which connects all incoming connections in the shape.

    This line is static, the user cannot manipulate and delete that line, the only things who could do is:
    - set the visibility of the property to false;
    - if the user connect another raddiagramconnection to the shape, the application must redraw the shape and the line including in the line's path the new added connection;
    - if the user remove an incoming connection to the shape,  the application must redraw the shape and the line excluding the removed connection from the line's path.
    - If the shape is moved or is set a new layout in the RadDiagram, the line follows the shape continuing to connect incoming connections.
    - Finally when the shape is deleted the line is deleted.

    I' ve try two solutions to have the desired behaviour:

    - The first one is to add a content to the RadDiagramShape, the content can be a line or a polygon  or a path like line;
    - The second one is to extend the shape in a new class which override the base RadDiagramShape changed the default geometry with another which include the base shape and add the line;

    In these two solutions I' ve found several problems, in the first case is impossible to bind in the xaml the points such as viewmodel  property, in the second one there was a mismatch between the points set in the code and the points in the RadDiagram.


    At this point Am I following the right way?? Have you other ideas or examples or other ways to help me?

    Thanks
    Ciro



  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 05 Mar 2014 Link to this post

    Hi Ciro,

    Thank you for clarification. I perfectly understand your scenario. You are allowed to change the appearance of the RadDiagramShape by customizing its Geometry property.
    Also, you are allowed to traverse the incoming and the outgoing links of a shape by using its IncomingLinks and OutgoingLinks properties (read more).

    However, there is no way of implementing the customization regarding the line connecting all incoming connections of a shape.

    Thank you for understanding this limitation of the RadDiagram control.

    Regards,
    Pavel R. Pavlov
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Back to Top