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

Unexpected size change when docking from code

Thread ID:





68347 Sep 19,2007 01:30 AM UTC Sep 21,2007 04:27 AM UTC WinForms 4
Tags: Tools
Andrey Kozyrev
Asked On September 19, 2007 01:30 AM UTC

We consider purchasing the Syncfusion Studio to be used in our new product. I'm doing the POC of using the Syncfusion Docking Library as a backbone of our IDE style application (like Eclipse, Visual Studio etc).

I ran into the problem I cannot overcome and understand. I created a sample to illustrate the issue. Please have a look:

public MainForm()

// create a red view
this.red = new SizeView();
this.red.ForeColor = Color.Red;

// create a blue control
this.blue = new SizeView();
this.blue.ForeColor = Color.Blue;

// set some docking mgr properties
this.dockMgr.DockToFill = false;
this.dockMgr.PersistState = false;

// dock red view to the right edge of the form with the width = 200 - works great!
this.dockMgr.DockControl(this.red, this, DockingStyle.Right, 200);

// dock blue view to the top of the red view with the height = 250 - makes the width of red and blue views = 502! Why?!
this.dockMgr.DockControl(this.blue, this.red, DockingStyle.Top, 250);

This code is shortened from what I have in the sample. Please run the sample to see the problem.



Andrey Kozyrev
Replied On September 19, 2007 01:36 AM UTC

.NET: 2.0
Visual Studion: 2005
Syncfusion Essential Studio:

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On September 20, 2007 08:11 AM UTC

Hi Andrey,

Thanks for evaluating Syncfusion products.

The Essential Tools Docking Windows framework enables developers to add docking windows, similar to those found in the Microsoft Visual Studio.NET IDE, to their Windows Forms applications. At the most basic level a docking window may be defined as a control that attaches itself to a host form's border, is capable of being dragged around and docked to different edges within the form and can also be dragged off the host form and floated as an individual top-level window. The docking framework allows just about any child control on a form to be made into a fully qualified docking window.

While working with this docking windows through code we should Call the DockingManager.BeginInit() method to signal the object that initialization is starting and Call the DockingManager.EndInit() method to signal that initialization is complete. the above two methods inherits the ISupportInitialize, which allows controls to optimize for multiple sets to properties. As a result, you can initialize co-dependent properties or batch set multiple properties.

Please refer the sample from the below link, which illustrates the above,


This solves the width increasing issue.

Note: The BeginInit() and EndInit() have been excluded from being shown in the VS code editor. Hence you would not see this function being displayed in the dropdown.

Please let me know if you want any more details.


Andrey Kozyrev
Replied On September 20, 2007 04:53 PM UTC

Hi Fahad,

That works! :)


Mohamed Suhaib Fahad A. [Syncfusion]
Replied On September 21, 2007 04:27 AM UTC

Hi Andrey,

Thanks for the update.

Let me know if you have any other queries.



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