What does it mean by docking of controls?
Docking is the property of the control to attach itself to a particular edge of the window (or other containing control). You can either dock a control to an edge or to fill the available space in the parent control or window. Common examples of docking includes menu bar and toolbars which dock themselves at the top of the window so that they may remain at top regardless of the size and of the window.
In the figure below, we have docked the button to the top of the window
When the control is resized, the control remains stuck to the top of the window
(Does it remind you the famous outlook bar?)
You can define a control to have a fill dock property so that it may fill all the available space in the parent window or parent control. In the figure below, we have docked the tree view control at left and the list view control with fill docking property
When the form is resized, the tree view will remain at left (changing only its height and not width) while the list view will expand itself to the rest of the available space on the form
(Does it remind you the famous Windows Explorer?)
A control is not docked to any edge, by default.
Index