How to hide the close button of document window in SfDockingManager?
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.
- Both
- Common
- Extended
- Individual
- Hide
- 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
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
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>
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
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>
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>
Sample: DocumentWindow_CloseButton_Type