Skip to main content
All docs
V25.2
  • IDockController.AddPanel(DockType) Method

    Creates a LayoutPanel and docks it at the specified side of the DockLayoutManager container (root group).

    Namespace: DevExpress.Xpf.Docking

    Assembly: DevExpress.Xpf.Docking.v25.2.dll

    NuGet Package: DevExpress.Wpf.Docking

    Declaration

    LayoutPanel AddPanel(
        DockType type
    )

    Parameters

    Name Type Description
    type DockType

    A DockType value that specifies the side of the DockLayoutManager container where the LayoutPanel is docked.

    Returns

    Type Description
    LayoutPanel

    The created LayoutPanel object.

    Remarks

    If the type parameter is set to DockType.None or DockType.Fill, the AddPanel method creates a LayoutPanel object. However, it will not be displayed anywhere. To display the panel, you need to manually dock it to the root group or any other panel, for example, with the DockControllerBase.Dock method. Or, if you want to hide this panel, add it to the DockLayoutManager.ClosedPanels collection. To auto-hide the panel, add it to a AutoHideGroup. To make the panel floating, add it to a FloatGroup.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddPanel(DockType) method.

    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