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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DockingManager: Setting specific initial placement without VS designer

Thread ID:

Created:

Updated:

Platform:

Replies:

82370 Jun 10,2009 06:21 PM UTC Jun 17,2009 11:49 AM UTC WinForms 3
loading
Tags: Tools
Fletcher Comstock
Asked On June 10, 2009 06:21 PM UTC

I am working in C#. I am using Syncfusion version

I have a windows form which has two panels. I wish to start up the form such that the panels are left-aligned docked, and docked with each other. To state another way I have a single docking area on the left side of the form which has two dock-able controls in it.

I am having trouble duplicating this using just source code. I can do it using visual studios designer however the source code the designer creates does not allude to how the initial control placement is stored. I have attempted to use the DockControl public method on the docking Manager, which will let me set Panel 1 in Panel 2 as a tabbed docking but if I set bottom or any other type of DockingStyle, it associates that panel 's docking with entire form rather than the control I've set as parent.

How do I programmatically set these panels on startup and is there a way to save and store this information for later/reloading?

Thank you for any help.



Syncfusion-Example_ec50399f.GIF

Administrator [Syncfusion]
Replied On June 12, 2009 09:15 AM UTC

Hi ,

Thank you for using Syncfusion products.

You can achieve your requirement using the code snippet below.

[C#]

this.dockingManager1.DockControl(this.panel1, this, DockingStyle.Left, 100);
this.dockingManager1.DockControl(this.panel2, panel1, DockingStyle.Bottom, 100);

The docking windows framework has a fully built-in serialization feature . Please find Online documentation of Dock state persistence from the location below.

http://help.syncfusion.com/ug_72_new/Toolswin/Persistence2.html

Please find the sample below that demonstrates the above and let me know if this helps you.

http://files.syncfusion.com/support/Tools.Windows/7.2.0.20/F82370/Tools_WF_Docking_SaveLoad.zip

Regards,
Jaya



Fletcher Comstock
Replied On June 12, 2009 03:33 PM UTC

Thank you for the code sample. That is actually what I tired to do the first time and it did not appear to work correctly. I do not understand why. I instead implemeneted another solution where in I built up a new form with dockable panels in the designer, and I'm now embedding the more complicated controls into the windows panels.

The problem I am running into now is that I have an old code snippet:

DockHost dh = this.panel1.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
dhc.HideCaption = true;

Which is supposed to hide the panel's title bar. But it does not appear to be doing so. Is this because I'm using the designer's serialized layout instead of manually docking now? Or is there some other option I need to set before I can do this?

Fathima Shalini P [Syncfusion]
Replied On June 17, 2009 11:49 AM UTC

Hi,

Thank you for your update.

If your intention is to hide the CaptionBar at design time, it is possible using DockingManager's ShowCaption property. Kindly refer to the following online tutorial link provided below:

http://help.syncfusion.com/ug_72/toolswin/CaptionBar.html

If I have misunderstood your requirement, could you please let me know in detail so that I could work out in depth and provide you a better solution at the earliest?

Please let me know if any concerns.

Regards,
Fathima

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.

Warning Icon 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.Close Icon

;