Need help in Migration from RadDragAndDropManager to DragDropManager

2 posts, 0 answers
  1. Deepa
    Deepa avatar
    5 posts
    Member since:
    Feb 2015

    Posted 20 Jun 2018 Link to this post

    Trying to migrate from RadDragAndDropManager  to DragDropManager.

     

    Below is my existing code : 

     

    RadDragAndDropManager.AddDragQueryHandler(this.gvDocumentToAttach, OnDragQuery);

    RadDragAndDropManager.AddDragInfoHandler(this.gvDocumentToAttach, this.OnDragInfo);

     

    private void OnDragQuery(object sender, DragDropQueryEventArgs e)

    { e.QueryResult = true; e.Handled = true; } 

    private void OnDragInfo(object sender, DragDropEventArgs e) {

    IEnumerable draggedItems = e.Options.Payload as IEnumerable;

    if (e.Options.Status == DragStatus.DragInProgress)

    { TreeListViewDragCue cue = new TreeListViewDragCue();

    cue.ItemsSource = draggedItems;

    e.Options.DragCue = cue; } }

     

    Wanted to know the corresponding options available in DragDropManager.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2216 posts

    Posted 22 Jun 2018 Link to this post

    Hello Ankit,

    I could recommend you to check the DraDropManager Migration help article. Note that the DragDropManager doesn't work with a specific Options object as the old manager. Instead, it uses the WPF native capabilities and options provided which means that it carries the drag data via the Data property of the arguments. You can easily work with the dragged Data via the DragDropPayloadManager.

    Regards,
    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top