Skip to main content

DocumentGroup.ClosePageButtonShowMode Property

Gets or sets whether Close buttons are displayed in individual tab pages and the tab container’s header. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v21.2.dll

Declaration

public ClosePageButtonShowMode ClosePageButtonShowMode { get; set; }

Property Value

Type Description
ClosePageButtonShowMode

A ClosePageButtonShowMode value that specifies the display mode for Close buttons.

Available values:

Name Description
Default

The same as the ClosePageButtonShowMode.InTabControlHeader option.

InTabControlHeader

The Close button is displayed in the tab container’s header.

InAllTabPageHeaders

Close buttons are displayed in all pages. The Close button in the container’s header is hidden.

InActiveTabPageHeader

A Close button is displayed in the active page. The Close button in the container’s header is hidden.

InAllTabPagesAndTabControlHeader

Close buttons are displayed in all pages and in the container’s header.

InActiveTabPageAndTabControlHeader

Close buttons are displayed in the tab container’s header, and within the active page.

NoWhere

Close buttons are not displayed.

Remarks

You can display Close buttons in the tab container’s header and individual tab pages. Use the ClosePageButtonShowMode to specify the visibility of Close buttons. You can use the BaseLayoutItem.ShowCloseButton property to hide Close buttons.

When you click a panel’s Close button, this panel is aded to the DockLayoutManager.ClosedPanels collection.

Example

The following code sample displays Close buttons in each tab’s page header:

<dx:ThemedWindow
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:LayoutGroup>
      <dxdo:DocumentGroup MDIStyle="Tabbed" ClosePageButtonShowMode="InAllTabPageHeaders">
        <dxdo:DocumentPanel Caption="MainWindow.xaml.cs">
          <RichTextBox></RichTextBox>
        </dxdo:DocumentPanel>
        <dxdo:DocumentPanel Caption="MainWindow.xaml" >
          <RichTextBox></RichTextBox>
        </dxdo:DocumentPanel>
        <dxdo:DocumentPanel Caption="App.xaml"/>
        <dxdo:DocumentPanel Caption="App.cs"/>
      </dxdo:DocumentGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>

Dock Layout Manager - ClosePageButtonShowMode property

See Also