Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ControlContainer Class

Represents the client area of a dock panel.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public class ControlContainer :
    Panel,
    ITransparentBackgroundManager,
    IDirectXProviderOwner,
    IDirectXClientProvider

The following members return ControlContainer objects:

#Remarks

A dock panel’s client area is represented by the ControlContainer control.

DockPanel_ControlContainer

The panel’s control container can be accessed via the DockPanel.ControlContainer property. Use this property’s Controls collection to manipulate (add, remove or access) the visual controls within a panel.

#Example

In the following example a new panel is created and floated. Then a property grid is added to the panel and this lists the dock panel’s properties. To add visual controls to the panel, the DockPanel.ControlContainer property is used. The result is shown below:

DockPanel_ControlContainer_ex

using DevExpress.XtraBars.Docking;
// ...
// Create a floating dock panel.
DockPanel panel1 = dockManager1.AddPanel(DockingStyle.Float);
panel1.Text = "Panel 1";
// Create a property grid and place it on the panel.
PropertyGrid pGrid = new PropertyGrid();
panel1.ControlContainer.Controls.Add(pGrid);
pGrid.Dock = DockStyle.Fill;
pGrid.SelectedObject = panel1;
See Also