Articles in this section
Category / Section

How to hide the close button of document window in SfDockingManager?

1 min read

We can change the visibility of close button in document window of SfDockingManager with below list of types. This can be changed by set the CloseButtonType of DocumentTabControlStyle in SfDockingManager.

 

  1. Both
  2. Common
  3. Extended
  4. Individual
  5. Hide
  6. IndividualOnMouseOver

 

Common: It will display the close button on right corner of document tab header panel. It closes the tabs based on the selected item.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
    <Style TargetType="Layout:DocumentTabControl">
     <Setter Property="CloseButtonType" Value="Common">
     </Setter>
    </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

 

Screenshot

 

Graphical user interface, text, application, email

 

Both: It will display the close button on each individual document tab items and common close button for all document window.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
    <Style TargetType="Layout:DocumentTabControl">
     <Setter Property="CloseButtonType" Value="Both">
     </Setter>
    </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

 

Screenshot

 

Graphical user interface

 

 

Hide: It hide the close button of all document tabs.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
    <Style TargetType="Layout:DocumentTabControl">
     <Setter Property="CloseButtonType" Value="Hide">
     </Setter>
    </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

 

 

 

Graphical user interface, text, application

 

Individual: It will display the close button of all document tabs.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
    <Style TargetType="Layout:DocumentTabControl">
     <Setter Property="CloseButtonType" Value="Individual">
     </Setter>
    </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

Screenshot

 

Graphical user interface, application

 

IndividualOnMouseOver: It will display the close button when mouse hover the document tab.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
  <Style TargetType="Layout:DocumentTabControl">
    <Setter Property="CloseButtonType" Value="IndividualOnMouseOver">
     </Setter>
  </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

 

Graphical user interface

 

Extended: It will display the close button for active document tab and mouse hover document tab.

 

Code Example: [Xaml]

 

<Layout:SfDockingManager.DocumentTabControlStyle>
  <Style TargetType="Layout:DocumentTabControl">
    <Setter Property="CloseButtonType" Value="Extended">
     </Setter>
  </Style>
</Layout:SfDockingManager.DocumentTabControlStyle>

 

Graphical user interface

 

 

 

Sample:  DocumentWindow_CloseButton_Type

 

 

 

 

 

 

 

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied