[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
   [Expand]Managing Dock Panels in Code
    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)

Header Buttons

Expanded Default Panel Buttons

Default panel buttons are "Maximize", "Auto-Hide" and "Close".

You can hide unwanted default buttons for specific panels. To do so, use required properties from the DockPanel.Options section. To do this for all panels at once, utilize properties from the DockManager.DockingOptions group instead.

Close Button

Maximize Button

  • Available for floating panels and child panels of split containers.
  • Maximized floating panels occupy the entire screen. In split containers, maximized panels fill these containers almost entirely.
  • Utilize the BaseDockOptions.ShowMaximizeButton property to hide maximize buttons for all panels or individual panels only.

Auto-Hide Button

Expanded Add Custom Header Buttons To Dock Panels

To add custom header buttons at design time, click the ellipsis button next to the DockPanel.CustomHeaderButtons property to invoke the Collection Editor dialog. In this dialog, click the "Add" button to create header buttons for a panel.

The property grid to the right of the Collection Editor allows you to modify button properties.

To add custom buttons in code, populate the DockPanel.CustomHeaderButtons collection with the CustomHeaderButton class instances.

Expanded Custom Button Types

There are three types of custom header buttons.

Push Buttons

Check Buttons

Radio Buttons

Expanded Arranging Default and Custom Header Buttons

Both default and custom header buttons are arranged depending on the VisibleIndex property value. The less a button visible index is, the closer this button will be to the panel caption. For default buttons, this value is fixed.

  • "Maximize" - visible index is 100.
  • "Auto-Hide" - visible index is 101.
  • "Close" - visible index is 102.

The following figure illustrates an example.

Expanded Buttons in Content Container Headers

Split and tab panel containers are objects of the DockPanel class and thus, they support header buttons. Header buttons for split containers are visible only when these containers float.

For tab containers, their own headers merge with a header of a currently active tab. This means a tab container displays both standard and custom header buttons of its active tabs, plus custom buttons added to this container directly.

Auto-hide containers have no headers and cannot display any buttons.

Expanded Example

In this example, a tab container with four panels within has five custom buttons added to its header.

  • The "Close" push button hides the currently active tab.
  • The "Auto-Hide" check button hides and restores the tab container.
  • Three "Align ..." check buttons united in a single group apply different text alignment settings to memo edit controls, hosted within dock panels.

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