windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-dot-ctor-6d1314ab.md
Initializes a new instance of the DockManager class.
Namespace : DevExpress.XtraBars.Docking
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public DockManager()
Public Sub New
The default constructor initializes all fields to their default values and sets the DockManager.Form property to null.
The DockManager.Form property refers to 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 panels are added to the dock manager. If you are creating a dock manager using this constructor, you should initialize the DockManager.Form property manually before adding panels to the 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