How to show or hide the buttons in the title bar of a particular docking window in WinForms Docking Manager?
Change visibility of caption buttons
The Docking Manager has 6 methods for the manipulation of the buttons displayed in Title bar.
SetCloseButtonVisibility(Control crtl,bool visibility) : Used to show/hide the close button in the title bar of the particular window.
GetCloseButtonVisibility(Control crtl) : Returns a bool value according to the visibility of close button
SetAutoHideButtonVisibility(Control ctrl,bool visibility) : Used to show/hide the Autohide button in the title bar of the particular window.
GetAutoHideButtonVisibility(Control crtl) : Returns a bool value according to the visibility of AutoHide button
SetMenuButtonVisibility(Control ctrl,bool visibility) : Used to show/hide the menu button in the title bar of the particular window.
GetMenuButtonVisibility(Control crtl) : Returns a bool value according to the visibility of menu button
C#
// Hide the Close button in the Tittle Bar for gradientLabel1 Control this.dockingManager1.SetCloseButtonVisibility(this.gradientLabel1, false); //true to show again // Gets the visibility of menu button in the title bar of gradientLabel1 Control. this.dockingManager1.GetCloseButtonVisibility(this.gradientLabel1) //true is button is visible.false otherwise.
VB
' Hide the Close button in the Tittle Bar for gradientLabel1 Control. me.dockingManager1.SetCloseButtonVisibility(me.GradientLabel1, False); 'True to show again. ' Gets the visibility of menu button in the title bar of gradientLabel1 Control. me.dockingManager1.GetCloseButtonVisibility(me.GradientLabel1) //True is button is visible.False otherwise.
UG document link: https://help.syncfusion.com/windowsforms/dockingmanager/dock-window#change-visibility-of-caption-buttons