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

Multiple Diagrams

1 Answer 97 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 1
Jakub asked on 18 May 2015, 08:24 AM

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

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 20 May 2015, 02:12 PM
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
Tags
Diagram
Asked by
Jakub
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or