[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Collapse]Docking Library
   [Expand]Panels and Panel Containers
    Header Buttons
   [Collapse]Managing Dock Panels in Code
     Creating and Destroying Dock Panels
     Showing and Hiding Dock Panels
     Docking Panels Programmatically
     Controlling Dock Operations
     Controlling Resizing Operations
    Saving and Restoring the Layout of Dock Panels
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Showing and Hiding Dock Panels

This topic describes how you can show and hide dock panels via code. For information on creating and destroying dock panels, refer to the Creating and Destroying Dock Panels topic.

Expanded Showing and Hiding Dock Panels

A dock panel's visibility is controlled by its DockPanel.Visibility property. If this property is set to DockVisibility.Visible the panel is visible. If this property is set to DockVisibility.Hidden then the panel is not displayed on screen (it's hidden).

For panels docked to the form and their child panels the DockPanel.Visibility property can be set to DockVisibility.AutoHide. This enables the auto-hide functionality for the panel. For floating panels setting the DockPanel.Visibility property to DockVisibility.AutoHide has no effect.

To display a hidden panel, you can also call its DockPanel.Show method. This method sets the panel's DockPanel.Visibility property to DockVisibility.Visible. If it's necessary to hide a dock panel, you can call its DockPanel.Hide method.

Indexed access to hidden panels is provided via the DockManager.HiddenPanels collection.

Expanded Example

The following code demonstrates how to hide all the visible floating panels. The visible floating panels are accessed via the DockManager.RootPanels collection. For such panels the DockPanel.FloatForm property refers to a valid object (floating form).

Expanded See Also

Is this topic helpful?​​​​​​​