Multiple Diagrams

2 posts, 0 answers
  1. Jakub
    Jakub avatar
    26 posts
    Member since:
    Apr 2015

    Posted 18 May 2015 Link to this post

    Hallo,

    i'd like to implement funcionality this: i have diagram wiht some shapes, connections groups etc. I ' d like to for example ... after double click on group open just this group in new diagram. Could you be so kind and write me some hints how to make or how to manage multiple diagrams saved in some for example list or array?

     

    thank you

    Best regards 

    Jakub

  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 20 May 2015 Link to this post

    Hello Jakub,

    Let me try to explain how the grouping of the RadDigram is made. When you group a few shapes there is not visual representation(element) that holds all of the SelectedShapes and that is why you cant detect when you click on the "Group" as there is no visual representation for it.
    As for your question about double click and making new diagram. You could use the ShapeDoubleClicked event of RadDiagram to do your custom logic when event is fired. Once you double click on a RadDiagramShape the event will be fired and in the event args (e.Shape) you can access the clicked shape. Once you canst the shape you will be able to access its ParentGroup property. If the shape is in group it will return the Group and you can then move through the Items collection of the group containing all of its children and execute your custom logic.
    Please note that if you are not in an MVVM scenario you cant use one UIElement for the two diagrams as each UIElement can have only one LogicalParent. In such cases you may need to make to implement a DeepCopy logic to copy all of the shape properties. However if you are using MVVM you should be able to get access to the DataContext and transfer all the needed properties.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top