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: November 16, 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:





82370 Jun 10,2009 06:21 PM UTC Jun 17,2009 11:49 AM UTC WinForms 3
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.


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.


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.


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



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


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:


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.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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