Skip to main content

How to: Enable the auto hide feature for root panels

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;