Copy paste between diagrams

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

    Posted 10 Jun 2015 Link to this post

    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

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 12 Jun 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top