Skip to main content
A newer version of this page is available. .

DockManager Class

The component that allows you to create docked, floating and/or auto-hidden dock panels inside a form or user control. See Docking Library.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v19.1.dll

Declaration

[SerializationOrder(Order = 1)]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "DockManager")]
public class DockManager :
    Component,
    ISupportInitialize,
    IXtraSerializable,
    IXtraSerializableLayout,
    IXtraSerializableLayout2,
    IBarAndDockingControllerClient,
    ISupportXtraSerializer,
    ISnapSupport,
    IStyleDockZone,
    ILogicalOwner,
    IScaleComponentNotificationClient,
    IObserver<IScaleComponentNotification>,
    IXtraSupportForceInitialize,
    IDocumentAdapterFactory,
    IWindowedDocumentAdapterFactory

Remarks

The DockManager class represents a component used to manage dock panels.

To add docking functionality for a specific container control (form or user control), you need to create a DockManager object and set its DockManager.Form property so that it refers to this control. If the DockManager.Form property is set to null, dock panels cannot be created.

The DockManager class provides the DockManager.AddPanel method for creating dock panels. To create split and tab containers, the DockPanel.AddPanel, DockPanel.DockTo and DockPanel.DockAsTab methods can be used.

The currently active dock panel is determined by the DockManager.ActivePanel property.

Panels that belong to the dock manager can be accessed using the following members:

Note

Because of possible conflicts, do not place multiple dock managers on a single form/user control. Instead, use a single dock manager or use multiple dock managers, each of which is displayed within its own UserControl object.

Note

When a DockManager is placed on a RibbonForm, you may notice slow performance during control startup rendering for complex projects. To resolve the issue, call the DockManager.ForceInitialize method on form loading.

Example

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";

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DockManager class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also