Back to Devexpress

ControlContainer Class

windowsforms-devexpress-dot-xtrabars-dot-docking-fff77eea.md

latest3.4 KB
Original Source

ControlContainer Class

Represents the client area of a dock panel.

Namespace : DevExpress.XtraBars.Docking

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public class ControlContainer :
    Panel,
    ITransparentBackgroundManager,
    IDirectXProviderOwner,
    IDirectXClientProvider
vb
Public Class ControlContainer
    Inherits Panel
    Implements ITransparentBackgroundManager,
               IDirectXProviderOwner,
               IDirectXClientProvider

The following members return ControlContainer objects:

Remarks

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

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:

csharp
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;
vb
Imports DevExpress.XtraBars.Docking
' ...
' Create a floating dock panel.
Dim panel1 As DockPanel = DockManager1.AddPanel(DockingStyle.Float)
panel1.Text = "Panel 1"
' Create a property grid and place it on the panel.
Dim pGrid As PropertyGrid = New PropertyGrid
panel1.ControlContainer.Controls.Add(pGrid)
pGrid.Dock = DockStyle.Fill
pGrid.SelectedObject = panel1

Inheritance

Object MarshalByRefObject Component Control ScrollableControl Panel ControlContainer

See Also

ControlContainer Members

DevExpress.XtraBars.Docking Namespace