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

RadDragAndDropManager to DragDropManager Migration Queries

1 Answer 159 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 11 Mar 2013, 04:21 PM
I'm trying to upgrade to Q1 2013 and I've am having some issues with the migration from RadDragAndDropManager to DragDropManager after reading your migration help
http://www.telerik.com/help/wpf/dragdropmanager-migration.html

What is the equivilant for the RadDragAndDropManager.DropQueryEvent?

What is the equivilant event for RadDragAndDropManagerDragInfoEvent with a status of DragStatus.DragInProgress?

Can you please provide a sample of the following based on DragDropManager, I can't see how to set cues on the new class
http://www.telerik.com/help/wpf/radtreeview-how-to-set-drag-cue-feedback-deny-drop.html

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 13 Mar 2013, 03:56 PM
Hello Chris,

You can customize the drag cue in the DragInitializeHandler method like this:

private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
    args.AllowedEffects = DragDropEffects.All;
    args.DragVisual = new ContentControl
    {
        Content = payload.GetData("DragData"),
        ContentTemplate = this.LayoutRoot.Resources["ApplicationTemplate"] as DataTemplate
    };
}
Where the ApplicationTemplate is a DataTemplate defined in the LayoutRoot element Resources section. For more information you can refer to this article. Also, the RadDragAndDropManager.DragInfoEvent is equivalent to the DragOver event. And if you'd like to implement a custom DragDrop logic for the RadTreeView using the new DragDropManager - you can take a look at the approach implemented in this demo. Specifically you can examine the TreeViewDragDropBehavior implementation where all DragDropManager events are handled to work with the RadTreeView control.

Also, please have in mind that we are currently refactoring the RadTreeView control and as soon as we're done, we will post help article(s) describing how to use the new drag and drop logic.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeView
Asked by
Chris
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or