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

RadDock DragDrop: How do I determine the dragged item.

2 Answers 92 Views
Dock
This is a migrated thread and some comments may be shown as answers.
F5F5F5
Top achievements
Rank 1
F5F5F5 asked on 16 Nov 2009, 10:44 AM
Hi

I have a RadDock control (named dockManager) that I am listening to the drag/drop service on, using the following code in the form's constructor:
            DragDropService dragDrop = dockManager.GetService<DragDropService>();  
            dragDrop.DragDropMode = DragDropMode.Preview;  
            dragDrop.PreviewDockPosition += new DragDropDockPositionEventHandler(dragDrop_PreviewDockPosition);  
            dragDrop.Starting += new StateServiceStartingEventHandler(dragDrop_Starting);  
            dragDrop.AllowedStates = AllowedDockState.All & ~AllowedDockState.TabbedDocument;  
 
 
I need to determine whether I am dragging a ToolWindow, a DockTabStrip and also determine the type of toolwindow/DockTabStrip
At the risk of asking a stupid question, how do I determine what object I am dragging in dragDrop_Starting event handler and/or dragDrop_PreviewDockPosition?

Thanks in advance

Alan

2 Answers, 1 is accepted

Sort by
0
F5F5F5
Top achievements
Rank 1
answered on 16 Nov 2009, 11:08 AM
To answer my own question:
In the dragdrop event handlers, cast the sender to DragDropService and use dragDrop.DragDropContext.

I was attempting to use dragDrop.Context and it was returning null.

So, apologies for asking the initial silly question. In my defence, it is Monday morning and I don't normally wake up properly until half way through Tuesday.
0
Georgi
Telerik team
answered on 18 Nov 2009, 04:39 PM
Hi Alan,

Thank you for sharing with the community.


Sincerely yours,
Georgi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Dock
Asked by
F5F5F5
Top achievements
Rank 1
Answers by
F5F5F5
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or