We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Load Dock State from files.

Thread ID:

Created:

Updated:

Platform:

Replies:

91590 Nov 24,2009 03:50 PM Dec 4,2009 10:45 AM ASP.NET Web Forms (Classic) 4
loading
Tags: Tools
Chris Burke
Asked On November 24, 2009 03:50 PM

Hi,
I'm using the DockManager and would like to have the ability to load a Dock layout from multiple files. For example, if a user generated layout file is not found, a default one is used. Could someone point me towards an example of this? Thanks.

Rajasekar B [Syncfusion]
Replied On November 26, 2009 07:03 AM

Hi,

While loading the dock state, if the file is not found you can restore docking state to the default state using the following methd:

this.dockingManager1.LoadDesignerDockState();

I have attached a sample. You can refer to it. Let me know if you have any question.

Thanks,
Rajasekar



Dockstate_b92f7614.zip

Chris Burke
Replied On December 2, 2009 04:23 PM

Thanks.
This leads me to another question. I want to be able to package up the file that stores the docking layout info I create, so that others can use my layout. Here is the snippet of code I'm using to save:

Syncfusion::Runtime::Serialization::AppStateSerializer
::InitializeSingleton
(Syncfusion::Runtime::Serialization::SerializeMode::XMLFile,
"defaultfile");
SaveDockingLayout();

Where would this file be save? Is it even possible to obtain ii and distribute via this method, or is there another way I'd have to go about saving it to do this? And if so, how?


Chris Burke
Replied On December 2, 2009 05:33 PM

I guess while I have your attention I have two other questions related to docking.

First is there a quick and easy way to tell the number of controls the docking window currently has attached to it?

And second. I'm also using the TabbedMdiManager. When closing the windows with the close button in the corner, the forms seem to get disposed. Is there a way around this, so they are just made hidden?

Thanks!

Rajasekar B [Syncfusion]
Replied On December 4, 2009 10:45 AM

Hi,

The saved xml file will be found in the bin folder of your application. The number of controls docked by the docking manager can be found by using the following line:

this.dockingManager1.ControlsArray.Count();

this will return the number of controls. To hide a form, when it is closed in tabbedmdimanager, handle its form closing event and cancel that event and use the following coding:
form.Hide();
form.MdiParent=null;

To show the form again, use the following lines of code:
form.Show();
form.MdiParent=this;

I have attached a sample. Refer to it and let me know if you have any question.

Thanks,
Rajasekar






tabmdiformclose_1b64585.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;