Saving all dock controls?

6 posts, 0 answers
  1. gdijim
    gdijim avatar
    13 posts
    Member since:
    May 2007

    Posted 23 Jun 2007 Link to this post

    Hey all -

    I've played with a few different bits of code to save the Dock controls, and was wondering if I was missing an easy way to save them in the app?

    The code dockingManager1.SaveXML(FileName);  and dockingManager1.loadXML(FileName); only saves the dock structure, but not any of the internal controls.

    Thanks in advance,
    Jim
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 25 Jun 2007 Link to this post

    Hi Jim,

    The docking manager only saves it's docking layout structure. To load and use internal controls you must implement your custom logic. Here is a KB article, which may be used in your scenario:
    http://www.telerik.com/support/kb/article/b454K-mcd-b454T-ckg-b454c-ckg.aspx



    Best wishes,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. tree
    tree avatar
    4 posts
    Member since:
    Oct 2014

    Posted 29 Oct 2014 in reply to Julian Benkov Link to this post

    The article is not work any more, can i have other information on it?

    and i have an another question is..
    when i am using the
    HostWindow host = this.radDock1.DockControl(form, DockPosition.Bottom, DockType.Document);
    to create a docking panel...
    Because the form which is defined by my class and inheritance the window form.
    how can i get my class information after using the dockControl
  5. George
    Admin
    George avatar
    500 posts

    Posted 03 Nov 2014 Link to this post

    Hi Tree,

    Thank you for writing.

    You can find the relevant article regarding how to save the internal controls here.

    In order to get your Form from the HostWindow you can use the Content property. More information about HostWindow can be found here.

    I hope this information will be helpful.

    Regards,
    George
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. tree
    tree avatar
    4 posts
    Member since:
    Oct 2014

    Posted 05 Nov 2014 in reply to George Link to this post

    As i load the form xml.
    i use the ((HostWindow)dock).LoadContent(functionForm) to load the content in my DockWindows.
    But i MdiChildren cannot be set. ( this.radDock1.MdiChrildren).

    As the original form which is created by form.show() and the following setting have be set.
    this.radDock1.AutoDetectMdiChildren = true;
    this.radDock1.MdiChildrenDockType = DockType.ToolWindow;

    After the form have be showed, the ( this.radDock1.MdiChrildren) should content the information.
    But how can i work it on LoadFromXml and using the loadContent.
  7. George
    Admin
    George avatar
    500 posts

    Posted 07 Nov 2014 Link to this post

    Hello Tree,

    Thank you for replying.

    When using the MDI detection all MDI forms are added to the MdiChildren collection of RadDock. You can access them and add your controls as you would in a standard form since the children are of type Form​:
    private void Form1_Load1(object sender, EventArgs e)
    {
        this.RadDock.MdiChildren[0].Controls.Add(new MyControl());
    }

    I hope this will help.

    Regards,
    George
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready