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.

Programmatically dock two controls

Thread ID:





40162 Jan 26,2006 02:39 PM Apr 3,2006 10:29 AM Windows Forms 8
Tags: Tools
Navanith Keerthi
Asked On January 26, 2006 02:39 PM

How can I programmatically dock two controls to the left region? so that controls appear one below another. And both controls must collapse to the left region. In other words, I want to set 1st control docking style = left 2nd control docking style = left + bottom I could do this in VS.NET IDE using drag-n-drop, but unable to do it programmatically Any suggestions or help?

Vijayanand S [Syncfusion]
Replied On January 27, 2006 04:45 AM

Hi , Thanks for using Syncfusion Products. You could set the docking window to bottom of the other window using the following statement: this.dockingManager1.DockControl(this.panel2,this.panel1,DockingStyle.Bottom,190); This above statement will dock a panel2 into bottom of the panel1. Please refer the attached sample and let me know if you need further assistance. Thanks, Vijay Test Sample

Navanith Keerthi
Replied On January 27, 2006 09:19 AM

I am aware of this, what I am looking for is, when you collapse Panel2, it must collapse to the left, not to the bottom

Vijayanand S [Syncfusion]
Replied On January 27, 2006 10:55 AM

Hi, This DockStyle should change according to the parent control docking style was a known issue in versions earlier than V3.3 and it has been fixed internally. Could you please let me know the version currently you are using? Please let me know if you are interested in upgrading to v3.3 or v4.1. I will let you know about the download details. Thanks, Vijay

Navanith Keerthi
Replied On January 27, 2006 11:40 AM

Vijay, Currently we are licensed to version But I am trying with your evaluation version in VS 2005, your example application worked as expected. When I set DockToFill property to true then panel2 collapsed to bottom instead of left. Is this a known issue? Do you have any version later than that got this issue fixed? Thanks

Vijayanand S [Syncfusion]
Replied On January 27, 2006 01:05 PM

Hi, Sorry for the inconvenience caused. I was able to reproduce the issue when we set DockToFill mode to true and I will report this issue to our development team. We will try to fix this issue as early as possible. Thanks for bringing this issue into our attention. Regards, Vijay

Montesh Chhabria
Replied On March 30, 2006 06:11 PM

Hey , It''s pretty simple when we want to dock upto four controls as we have the four boundaries of the form to play with. I would like to have nearly eight controls docked in a predefined way as shown in the screen shot. Basically I have an XML in which the size and the location attributes of the controls shall be there. I would then need to dock based on this information. Can you guys help me out. thanks.

docking during runtime.zip

Joy K George [Syncfusion]
Replied On April 1, 2006 04:17 AM

Hi Montesh, I am looking into this issue .I will update you on monday Regards

Joy K George [Syncfusion]
Replied On April 3, 2006 10:29 AM

Hi Montesh, If you want to manipulate(loading docking layout) docking layout in a xml file, you could better use the State persist mechanism offered by the Docking Architecture.It allows us to save the docking layout in an xml file. Also If you want to specify the location for a docking control, I am afraid ,currently there is no method to implement this. As a workaround you could load the specified docking layout at runtime, by following the below steps. 1.Dock the controls in the designer. 2.Perform a trial execution and store the dockinglayout in an xml file. 3. Then for each subsequent execution you could load this specific layout by using the method LoadDockState. Please let me know ,if you have any queries regarding this. Regards, Joy


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.