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

Saving all dock controls?

5 Answers 160 Views
Dock
This is a migrated thread and some comments may be shown as answers.
gdijim
Top achievements
Rank 1
gdijim asked on 23 Jun 2007, 07:20 AM
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

5 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Jun 2007, 03:22 PM
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
0
tree
Top achievements
Rank 1
answered on 29 Oct 2014, 10:53 AM
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
0
George
Telerik team
answered on 03 Nov 2014, 10:57 AM
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.

 
0
tree
Top achievements
Rank 1
answered on 05 Nov 2014, 09:14 AM
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.
0
George
Telerik team
answered on 07 Nov 2014, 03:05 PM
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.

 
Tags
Dock
Asked by
gdijim
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
tree
Top achievements
Rank 1
George
Telerik team
Share this question
or