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

Drag and Drop using MVVM

3 Answers 44 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 11 Jul 2013, 07:37 PM
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

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 15 Jul 2013, 05:13 AM
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.
0
Thomas
Top achievements
Rank 1
answered on 15 Jul 2013, 07:34 AM
Hello,

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

T
0
Tina Stancheva
Telerik team
answered on 16 Jul 2013, 11:54 AM
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 >>
Tags
TreeView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Thomas
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or