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

Copy paste between diagrams

1 Answer 117 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 1
Jakub asked on 10 Jun 2015, 01:10 PM

Hallo,

I'd like to ask you what is wrong in my scenario. I have tab control with more tabs. In every tab si RadDiagram. When i try copy paste in one diagram everyhing is fine. When i copy item from one diagram to another i have some trouble with style selector. In first case(copy and paste in one diagram) input paramter of the SelectStyle method is type MindMapNode(my custom class represents diagram node. it inherit NodeViewModelBase). But when i copy paste from one diagram to another input parameter of SelectStyle method is Shape  so my logic of selecting style can't handle it. Could you be so kind and give me some advice how to fix this ? 

 

Thank you very much.

Greetings 
Jakub

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 12 Jun 2015, 03:19 PM
Hello Jakub,

Which parameter do you have in mind - "item" or the "container", item should give you the ViewModel behind the shape/container ?
public class ShapeStyleSelector : StyleSelector
   {
       public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container)

How do you create your custom shape, can you share some more code ? Do you use no-xaml styles ?

Regards,
Petar Mladenov
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
Petar Mladenov
Telerik team
Share this question
or