RadDragAndDropManager to DragDropManager Migration Queries

2 posts, 0 answers
  1. Chris
    Chris avatar
    7 posts
    Member since:
    Jan 2012

    Posted 11 Mar 2013 Link to this post

    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
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 13 Mar 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top