windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-115173da.md
Provides access to the collection of visible panels which are not owned by other panels.
Namespace : DevExpress.XtraBars.Docking
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
public DockPanelCollection RootPanels { get; }
<Browsable(False)>
Public ReadOnly Property RootPanels As DockPanelCollection
| Type | Description |
|---|---|
| DockPanelCollection |
A DockPanelCollection object.
|
The RootPanels property provides access to the collection of visible panels which are not owned by other panels. This collection includes:
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.
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++;
}
Imports DevExpress.XtraBars.Docking
' ...
Dim index As Integer = 0
While index < DockManager1.RootPanels.Count
Dim rootPanel As DockPanel = DockManager1.RootPanels(index)
' Enable the auto hide functionality if the panel is not floating.
If (rootPanel.FloatForm Is Nothing) Then
rootPanel.Visibility = DockVisibility.AutoHide
Else
index = index + 1
End If
End While
See Also