windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-dot-ctor-x28-system-dot-windows-dot-forms-dot-containercontrol-x29.md
Initializes a new instance of the DockManager class with the specified container control.
Namespace : DevExpress.XtraBars.Docking
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public DockManager(
ContainerControl form
)
Public Sub New(
form As ContainerControl
)
| Name | Type | Description |
|---|---|---|
| form | ContainerControl |
A ContainerControl object representing the container control that will display the dock panels owned by the created dock manager.
|
The constructor initializes all the fields to their default values.
The form parameter is used to initialize the DockManager.Form property. It represents the container control (form or user control) that will display the dock panels owned by the dock manager. The DockManager.Form property must refer to a valid control (not null ), otherwise an exception will occur when adding panels to the dock manager.
The following code shows how to add a dock manager to a form and create a panel.
using DevExpress.XtraBars.Docking;
// ...
// Create a dock manager
DockManager dm = new DockManager();
// Specify the form to which the dock panels will be added
dm.Form = this;
// Create a new panel and dock it to the left edge of the form
DockPanel dp1 = dm.AddPanel(DockingStyle.Left);
dp1.Text = "Panel 1";
Imports DevExpress.XtraBars.Docking
' ...
' Create a dock manager
Dim dm As DockManager = New DockManager
' Specify the form to which the dock panels will be added
dm.Form = Me
' Create a new panel and dock it to the left edge of the form
Dim dp1 As DockPanel = dm.AddPanel(DockingStyle.Left)
dp1.Text = "Panel 1"
See Also