Dock with MdiChildren

3 posts, 0 answers
  1. JOSE MANUEL PÉREZ RAMÍREZ
    JOSE MANUEL PÉREZ RAMÍREZ avatar
    22 posts
    Member since:
    Jan 2008

    Posted 07 Jul 2009 Link to this post

    i read help document and does not explain how i can use Mdichildre.
    I have an application with new Q2 RadDock. (i migrate).
    I create tabdocumentes
     IVVSA.Solicitudes.WinForms.VSolicitudLocales frmsolicitudlocales = new IVVSA.Solicitudes.WinForms.VSolicitudLocales(((vPrincipal)this.ParentForm).Credencial);
                            frmsolicitudlocales.MdiParent = this.ParentForm;
                            frmsolicitudlocales.Dock = DockStyle.Fill;
                            frmsolicitudlocales.Show();

    forms created like HostWindow and is into radDock1.DockWindows.ToolWindows. 
    Is possible set into radDock1.DockWindows.DocumentWindows?

    if i have a button in form to close then not run. Close from Form not fires close from radDock.
    how i do it?
    I suggest about an example to do correctly these problem. Manage MdiForms in tabDocuments.


  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Jul 2009 Link to this post

    Have you got the RadDock to AutoDetectMdiChildren?
    If you have, then as long as you do the following:
    Dim form as New FormName()
    form.MdiParent = Me
    form.Show

    then it should show and close correctly.
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 07 Jul 2009 Link to this post

    Hello JOSE MANUEL PÉREZ RAMÍREZ,

    Thank you for the question.

    The API for using RadDock in MDI scenario is pretty much the same as using the old DockingManager in MDI scenario. You should simply set the AutoDetectChildForm to true and RadDock will automatically host the MDI children.

    Having a HostWindow with a child form in the ToolWindows, but not in the DocumentWindows is actually a result of a feature. When a HostWindow is created to host a child form, this HostWindow has a DockType ToolWindow. This allows you to float the document containing the child form and even you can dock it in a ToolTabStrip with other ToolWindows. If the DockType is DocumentWindow, you will not be able to perform these operations.

    However, I agree that some of you, our users, may want to have the default DockType of a HostWindow in MDI scenario set to DocumentWindow. Therefore, in Q2 2009 SP1 we will make the DocumentWindow the default DockType and we will introduce a property which will switch between DocumentWindow and ToolWindow types for a HostWindow containing a child form.

    As to the form closing issue, you are correct. When a child form is closed, the HostWindow that contains the form is not closed automatically. This issue will be addressed in Q2 2009 SP1 as well. For the time being you can subscribe to the FormClosed event of the form and close the parent HostWindow:
    void form_FormClosed(object sender, FormClosedEventArgs e)  
    {  
        this.radDock1.RemoveWindow((HostWindow)((Form)sender).Parent);  

    Thank you for sharing your feedback with us. I am updating your Telerik points. If you have additional questions, feel free to contact me.

    All the best,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top