I have an application on 2 screens. I want to dock controls on the 2 screens and move them from one screen to the other screen.
So, I have to drag drop controls from the first raddock to the second and back but I didn't found any solution to do it.
Is there a solution ?
3 Answers, 1 is accepted
Thank you for writing.
The described functionality for dragging controls inside RadDock is available only at design time. At run time it is not designed to move the controls either between the different windows in the same RadDock or between two RadDock controls in different applications.
You can refer to the following article which demonstrates a general approach for achieving drag and drop functionality between two WinForms applications. You can manage the Controls collection of each of the forms and add/remove the desired control. It is up to you what exactly custom functionality you will implement: https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications
I hope this information helps. Should you have further questions I would be glad to help.
Did somebody find out a ''workaround" for that!
I have the same situation. I have programmed a very nice application with a ribbon and I can detect what kid of form is active in my Raddock so the menu in the ribbon is dynamic.
Since a lot of people have 2 screens right now, I was thinkg of , in the same application, start the same master_form ( where my ribbon is) and then with drag and drop or a button be able to ship my documentwindow to the other screen ( with the exact same layout since it is just another instance of my form).
But this code doesn't work
RadForm CurrentActiveDockWindows = (RadForm)((Telerik.WinControls.UI.Docking.HostWindow(RadDock1.DocumentManager.ActiveDocument)).MdiChild;
TheOtherScreen.RadDock1.DockControl(CurrentActiveDockWindows, Telerik.WinControls.UI.Docking.DockPosition.Fill, Telerik.WinControls.UI.Docking.DockType.Document);
Maybe it is me that doesn't understand (I'm new to telerik) I think that I'm transfering the radform of the doccumentDock element here... but I want to transfert all the DocumentElement on the other side...
RadDock still is not intended to support such kind of functionality at run time. If you have two separate forms, you can refer to the article from the previous reply demonstrating how to achieve drag and drop functionality in WinForms. Thus, when handling the drop operation you can programmatically create a RadDock with a DocumentWindow and the desired controls in the target form. The following help articles are quite useful about creating RadDock at run time:
I hope this information helps. If you have any additional questions, please let me know.