Articles in this section
Category / Section

How to set the DocumentCloseButtonType in DockingManger ?

1 min read

       CloseButton in DocumentContainer of DockingManager can be changed by

      DocumentCloseButtonType. DockingManager document close button types are

       Both, Common, Extended, Hide, Individual, IndividualonMouseOver.

       The same has been explained in the following code snippet:

       XAML:

//Code Explains how to set different DocumentCloseButtonType in DockingManager Control
<Window x:Class="DockingSample.MainWindow"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:sync="http://schemas.syncfusion.com/wpf"
 Title="MainWindow" Height="350" Width="525" >
 <Grid>
 <sync:DockingManager DockFill="False" UseDocumentContainer="True"   Name="DockSample" ShowTabListContextMenu="True" DocumentCloseButtonType="Extended">
 <ContentControl sync:DockingManager.SideInDockedMode="Left" sync:DockingManager.State="Dock"  sync:DockingManager.Header="Dock1" sync:DockingManager.IsContextMenuVisible="True"></ContentControl>
 <ContentControl sync:DockingManager.SideInDockedMode="Right" sync:DockingManager.Header="Dock2"></ContentControl>
 <ContentControl  sync:DockingManager.State="Document" sync:DockingManager.SideInDockedMode="Bottom" sync:DockingManager.Header="Test2" ></ContentControl>
 </sync:DockingManager>
  </Grid>
</Window>

       C#:

//Code Explains how to set different DocumentCloseButtonType in DockingManager 
namespace DockingSample
{
   public partial class MainWindow : Window
   {
       public MainWindow()
       {
            InitializeComponent();
            DockingManager.DocumentCloseButtonType =  
            CloseButtonType.Hide;
        }
    }
 }

 

      Output:

            Both:

       Sets the close button on both common and individual tabs.

                     C:\Users\Ashok.Murugesan\Desktop\KBTask\Both.png

          Common:

    Sets the close button as common for all tabs.

        C:\Users\Ashok.Murugesan\Desktop\KBTask\Common1.png

       Individual:

   Sets the close button to individual tab.

         C:\Users\Ashok.Murugesan\Desktop\KBTask\Individual1.png

    IndividualonMouseOver:

    Sets the close button when mouse over on the Document header.

             C:\Users\Ashok.Murugesan\Desktop\Switchmode\indimouse.png

           Hide:

   Hides the close button in docking manager tabs.

                      C:\Users\Ashok.Murugesan\Desktop\KBTask\Hide.png

 

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