Articles in this section
Category / Section

What is the purpose of the docking client panel in WinForms Docking Manager?

1 min read

Purpose of DockingClientPanel

The DockingClientPanel class is intended to serve as a container for the non-dockable controls on non-MDIcontainer forms. When using docking windows in the non-MDI case, all non-dockable controls that were originally intended to be located on the form should instead be placed on the DockingClientPanel. The docking windows framework repositions/resizes the DockingClientPanel in tandem with changes in the host form’s available client area during docking/undocking operations, and thus provides a static surface for hosting the form’s non-dockable controls.

The following sequence illustrates the steps involved in setting up a docking layout using the DockingClientPanel:

1. Add the DockingManager component to the non-MDIcontainer form.

2. Add an instance of the DockingClientPanel control to the form.

3. Resize the DockingClientPanel control so that it is large enough to accomodate the non-dockable controls on the form. Move all non-dockable controls from the form to the DockingClientPanel class.

4. Turn on the EnableDocking property for the applicable controls that still remain on the form. These will be transformed into docking windows.

5. Set the DockingClientPanel.SizeToFit property to True. The DockingClientPanel will now be readjusted to fill the form’s available client rectangle.

Reference link:

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment