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

Need help in Migration from RadDragAndDropManager to DragDropManager

1 Answer 90 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Deepa
Top achievements
Rank 1
Deepa asked on 20 Jun 2018, 11:00 AM

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.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 22 Jun 2018, 11:12 AM
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.
Tags
DragAndDrop
Asked by
Deepa
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or