Skip to main content
A newer version of this page is available. .

BaseLayoutItem.ShowCloseButton Property

Allows you to hide the current item’s Close button. This property is only supported for LayoutPanel and DocumentPanel objects. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Docking, DevExpress.Wpf.Navigation

Declaration

public bool ShowCloseButton { get; set; }

Property Value

Type Description
Boolean

true, if the Close (‘x’) button is visible; otherwise, false.

Remarks

The following example hides the Close button for the MainWindow.xaml.cs DocumentPanel:

<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" ShowCloseButton="False">
          <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 - ShowCloseButton property

You can use the DockLayoutManager.ClosingBehavior property to specify how a panel is closed.

The DocumentGroup.ClosePageButtonShowMode property specifies the Close button position.

See Also