ParentForm is Null

2 posts, 0 answers
  1. Chris Ward
    Chris Ward avatar
    56 posts
    Member since:
    Jan 2010

    Posted 21 Aug 2012 Link to this post

    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?
  2. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 24 Aug 2012 Link to this post

    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);

    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 >>
Back to Top