Back to Devexpress

DocumentGroup.ClosePageButtonShowMode Property

wpf-devexpress-dot-xpf-dot-docking-dot-documentgroup.md

latest4.3 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public ClosePageButtonShowMode ClosePageButtonShowMode { get; set; }
vb
Public Property ClosePageButtonShowMode As ClosePageButtonShowMode

Property Value

TypeDescription
ClosePageButtonShowMode

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

|

Available values:

NameDescription
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:

xaml
<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>

See Also

ShowCloseButton

ClosedPanels

DocumentGroup Class

DocumentGroup Members

DevExpress.Xpf.Docking Namespace