Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Examples
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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

How would you rate this topic?​​​​​​​