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

ParentForm is Null

1 Answer 104 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Chris Ward
Top achievements
Rank 1
Chris Ward asked on 21 Aug 2012, 01:24 PM
When the user pulls a toolwindow out of the dock control so that it appears as its own window, the ParentForm property no longer points to the form it was docked in.  Does this mean dock windows can be dragged and dropped from one dock control to another, or is this a side-effect or bug of some sort?  Is there an alternative way to get the parent dock control where the window was pulled from after the fact?

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 24 Aug 2012, 10:18 AM
Hi Chris,

Thank you for writing.

The ToolWindow is changing its ParentForm when its state changes to Floating, however, docking a ToolWIndows from one instance of RadDock to another is not possible.

To get the parent form of a ToolWindow you can use the FindForm method of the DockManager. Here is a sample:
ToolWindow window = new ToolWindow();
window.Text = "MyTool1";
radDock.DockWindow(window, DockPosition.Left);
...          
window.DockManager.FindForm();

I hope this helps. Feel free to ask if you have any additional questions. 

Kind regards,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
Dock
Asked by
Chris Ward
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or