Hello ,
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
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