Drag and Drop between two different View with MVVM

8 posts, 0 answers
  1. Richard
    Richard avatar
    14 posts
    Member since:
    Mar 2009

    Posted 26 Nov 2010 Link to this post

    Hi

    I have a little application, than this:
    http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

    I make the acquaintance of the Drag and Drop now, and I would like to ask it, that theoretically possible the Drag and Drop between two different View, or i can use it only one View than in these examples:

    http://www.telerik.com/help/wpf/raddraganddrop-between-treeview-gridview.html


    Thanks.
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Nov 2010 Link to this post

    Hello Richard,

    May you provide us with a bit more information about the exact behavior you want to accomplish ? What are the two views you want to drag and drop from and to ?
    Furthermore, you may take a look at our online documentation for further reference on a couple of sample scenarios when using the Drag & Drop Framework. However, this is not the full list of the achievable scenarios.

    Regards,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Richard
    Richard avatar
    14 posts
    Member since:
    Mar 2009

    Posted 26 Nov 2010 Link to this post

    Sorry, i don't read enough about this control, it's my fault. The problem solved.

    thx a lot
  5. Tuan
    Tuan avatar
    4 posts
    Member since:
    Sep 2011

    Posted 07 Nov 2011 Link to this post

    Hi,

    I have a same problem with drag and drop between to different View using MVVM. Maybe you could help me with it?

    I have a MainPage.xaml contains two Views: View1 and View2

    View1:
            <RadTreeView Name=View1

             IsDragDropEnabled

     

     

    ="True"

     

     

     

             DragDrop:RadDragAndDropManager.AllowDrop="False"

     

     

     

             DragDrop:RadDragAndDropManager.AllowDrag="True" />

     


    View2:  
          <RadTreeView Name=View2

             IsDragDropEnabled

     

     

    ="True"

     

     

     

             DragDrop:RadDragAndDropManager.AllowDrop="True"

     

     

     

             DragDrop:RadDragAndDropManager.AllowDrag="False" />

     


    I am using MVVM with ViewModel: ViewModel_View1 and ViewModel_View2

    Now I want to using Drag and Drop to drag from View1 and drop into View2. Could you please show me how to do it?
                     

  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 08 Nov 2011 Link to this post

    Hello Tuan,

     You could follow the approach in this online example where you can see drag drop between two RadTreeViews (and other controls as well).

    Best wishes,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Tuan
    Tuan avatar
    4 posts
    Member since:
    Sep 2011

    Posted 15 Nov 2011 Link to this post

    Thank you Didie,

    Now I have another question I would like to ask you:
    How can I disable tooltip to the target. When I drag an Item to another Item example from K tp P, then P is coming up in the tooltip. How can I disable this one? Thank you very much

    Regards

    Tuan
      
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Nov 2011 Link to this post

    Hello Tuan,

    You could change the DragTooltipVisibility of the TreeViewDragCue to be collapsed.

    cue.DragTooltipVisibility = System.Windows.Visibility.Collapsed;

    Please let me know if this is what are you looking for?

    Regards,

    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  9. Tuan
    Tuan avatar
    4 posts
    Member since:
    Sep 2011

    Posted 18 Nov 2011 Link to this post

    I try DragTooltipContent = null; DragTooltipContentTemplate = null; And it's working. Thanks for youe help.
Back to Top
UI for WPF is Visual Studio 2017 Ready