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

DockManager.RootPanels Property

Provides access to the collection of visible panels which are not owned by other panels.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
public DockPanelCollection RootPanels { get; }

#Property Value

Type Description
DockPanelCollection

A DockPanelCollection object.

#Remarks

The RootPanels property provides access to the collection of visible panels which are not owned by other panels. This collection includes:

  • visible floating panels which are not owned by any other floating panels. The Parent properties of these panels are represented by FloatForm objects.
  • visible panels docked to the dock manager’s DockManager.Form. These panels are not owned by other panels and therefore the Parent properties of these panels refer to the DockManager.Form object.

The RootPanels collection doesn’t include panels which belong to other panels and panels which have their DockPanel.Visibility property set to DockVisibility.Hidden and DockVisibility.AutoHide.

To access hidden panels use the DockManager.HiddenPanels collection. The panels which have their auto-hide functionality enabled can be obtained via the DockManager.AutoHideContainers collection.

Use index notation to get the child panels of a specific panel.

#Example

The following code demonstrates how to enable the auto hide feature for all root panels residing on the dock manager’s form. Floating panels are not affected by this code.

using DevExpress.XtraBars.Docking;
// ...
int index = 0;
while(index < dockManager1.RootPanels.Count) {
   DockPanel rootPanel = dockManager1.RootPanels[index];
   // Enable the auto hide functionality if the panel is not floating.
   if(rootPanel.FloatForm == null)
      rootPanel.Visibility = DockVisibility.AutoHide;
   else
      index++;
}
See Also