Drag and Drop using MVVM

4 posts, 0 answers
  1. Thomas
    Thomas avatar
    3 posts
    Member since:
    Feb 2013

    Posted 11 Jul 2013 Link to this post

    Hello,

    I'd like to implement drag and drop using the approach described in http://www.telerik.com/help/silverlight/radtreeview-how-to-implement-drag-and-drop-between-treeview-and-listbox.html.

    In there it is explained we should set TreeViewSettings.DragDropExecutionMode to New. When we do this, the mvvm command listening to the dragended event of the treecontrol is not working anymore.

    How the new mode is working with mvvm commands?

    Thx for your support
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Jul 2013 Link to this post

    Hi Thomas,

    Please have a look at this forum thread containing an attached sample project which deals with RadTreeView drag and drop with MVVM.

    Thanks,
    Shinu.
  3. DevCraft banner
  4. Thomas
    Thomas avatar
    3 posts
    Member since:
    Feb 2013

    Posted 15 Jul 2013 Link to this post

    Hello,

    this sample is very old and unfortunately does not use the TreeViewSettings.DragDropExecutionMode to New implementation of the treeview.

    T
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 16 Jul 2013 Link to this post

    Hello Thomas,

    The following events are only available with the Legacy DragDropExecutionMode:
    • PreviewDragStarted

    • DragStarted

    • PreviewDragEnded

    • DragEnded

    This is why if you set the DragDropExecutionMode to New, these event won't be fired at all. The new DragDropExecutionMode takes advantage of the DragDropManager and its events. Unfortunately you can't attach handlers for the DragDropManager events in xaml. Instead you can create a custom behavior that makes sure to associate a DragDropManager event with a command.

    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top