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

Drag and drop between a Window and a Popup

7 Answers 540 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Nick Polyak
Top achievements
Rank 1
Nick Polyak asked on 17 Feb 2010, 09:39 PM
I do not seem to be able to do it in WPF (in Silverlight it works fine).
Moreover, whenever I have an open popup (not for drag and drop), if I hover the mouse over it while doing a drag-and-drop operation the position of DragCue changes.
What do I do to get around these problems?
If I cannot use the WPF popup, are there any similar Rad controls that I can use instead?
Also I was trying to use RadWindow instead of a popup (even though popup is actually what we need) and it did not event allow me to drag the DragCue into it.
Please Help!!!!
Thanks

7 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 23 Feb 2010, 03:14 PM
Hi Nick Polyak,

Unfortunately DragDrop between two Windows is not yet supported by the Telerik WPF Drag&Drop. The same limitation exists for drag&drop between a Window and a Popup.

The reason for this is a bug in WPF where you cannot open a full-screen Popup (you can try but the Popup size is limited and it is not enough to cover a modern screen).  We need the popup as a surface to draw the arrows /  drag-cues. This limitation does not exist in Silverlight and the DragDrop there behaves as expected.

Therefore in WPF we use an adorner to draw the drag cues and this limits us just to DragDrop within the same window.

We are thinking of ways to work around this and we have planned to improve the DragDrop after the Q1 release.

I am sorry but I cannot offer a workaround for the time being.

Sincerely yours,
Miroslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nick Polyak
Top achievements
Rank 1
answered on 23 Feb 2010, 03:43 PM
I do not see any problem with WPF allowing a popup to cover a screen. If a software engineer does not make it do it, it will not do it.
 But forget about the popup, what about drag-drop between Telerik floating windows or simply different WPF Windows. We definitely need to have it.
thanks
0
Miroslav
Telerik team
answered on 23 Feb 2010, 04:22 PM
Hello Nick Polyak,

You say that:
"I do not see any problem with WPF allowing a popup to cover a screen. If a software engineer does not make it do it, it will not do it."

What I meant with my previous reply is that we need to use popups internally in the current implementation of the DragDrop to draw the drag arrows and cues but we cannot do this due to the large popups bug.

You can run the attached project and see that large popups indeed cannot be created.

We expect that will be able to come up with a different implementation of the DragDrop but until then I cannot offer a workaround.

At the time being for drag-drop across different windows I can only suggest using the built-in WPF DragDrop.

Greetings,
Miroslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nick Polyak
Top achievements
Rank 1
answered on 23 Feb 2010, 04:26 PM
What about the floating window is drag-drop between them going to stay broken? Someone else told me you were going to fix it in Q1.
0
Miroslav
Telerik team
answered on 23 Feb 2010, 04:45 PM
Hi Nick Polyak,

Yes, in this thread:

http://www.telerik.com/community/forums/wpf/docking/drag-drop-between-floating-windows-in-version-2010-q1-beta.aspx

a colleague does say that
 
"We will think about a solution for this problem - it is cause because of a limitation of our drag and drop manager and will fix it for the Q1 release"

After I read it I communicated our current hindrances but at the time of writing he did not know about the issues and has unintentionally mislead you.

I am sorry about this, contradictions like this are not at all expected.

Drag-drop between floating windows will improve after the Q1 release.

Greetings,
Miroslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kais
Top achievements
Rank 1
answered on 10 Feb 2011, 08:24 AM
Hi telerik, 

I was searching on this issue and disappointed to see RadDragDrop does not support drag & drop between two top level windows. I understand the limitation - you are using Adorners to do your drawing within the frame of the original window. 

Perhaps I can suggest a workaround for future releases? An open source DockManager (windows forms, Dock Panel Suite) that I used a long time ago used top level forms to simulate its dragging. For instance. When you dragged a dockable pane you got a rectangle the size and shape of the pane in blue, semi transparent, moving with the mouse. This was hidden when the pane was docked. 

The rectangle was implemented as a Form with Opacity and backcolour blue. The FormBorderStyle was set to none. 

Perhaps as a workaround RadDragDrop could be configured to use top level Window's with opacity, transparency and no border to host the object being dragged? Say there was a flag, RadDragDropManager.MultiWindowMode = true. In this mode the arrows would be dropped (or arrows could exist on their own form). 

In short, you dont need a full screen popup to implement this. You just need a popup the size and shape of your item being dragged, with opacity, a render-to-bitmap of the control being dragged on it and have the popup move with the mouse and hidden when the mouse is released. 

Best regards, 
0
Tsvyatko
Telerik team
answered on 10 Feb 2011, 09:41 AM
Hi Kais,

As I understand, your scenario involves drag/drop tabs between two windows (referring to the support ticket opened). Although we do not have build-in support for this in the tab control, this can be easily achieved using RadDragAndDropManager.
Since Q3 2010 we have introduced native drag mode in it that allows dragging between two windows as well as external application . It can be enabled through RadDragAndDropManager.EnableNativeDrag

I have prepared simple application to illustrate how achieve the desired functionality. Please, have a look at it and let me know if this fits to your scenario.

All the best,
Tsvyatko
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
DragAndDrop
Asked by
Nick Polyak
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Nick Polyak
Top achievements
Rank 1
Kais
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or