Controlling visibility of elements in a dock panel
|
Article relates to
|
RadDock for WinForms
|
|
Created by
|
Julian Benkov, Telerik
|
|
Last modified
|
February 23, 2007
|
|
Last modified by
|
Julian Benkov, Telerik
|
HOW-TO
Control visibility of elements in a dock panel
SOLUTION
Every dock panel (like DockPanel, UserDockControl, or any IDockable window with DockType = DockType.ToolWindow) implements the IToolWindowLayoutController interface which is responsible for the visibility of ToolWindow elements like caption, window position dropdown button, pin/unpin button, close button, and the tabstrip.
The following properties control the behavior and visibility of the ToolWindow elements:
- CaptionVisible controls the visibility of the whole tool window caption element:
| DockPanel dockPanel = new DockPanel(); |
| dockPanel.CaptionVisible = false ; //default value is true |
- CloseButtonVisible is the controller of the tool window's Close button which is used to hide dock panel:
| DockPanel dockPanel = new DockPanel(); |
| dockPanel.CloseButtonVisible = false ; //default value is true |
- HideButtonVisible is the property to change the visibility of the Autohide dock panel button:
| DockPanel dockPanel = new DockPanel(); |
| dockPanel.HideButtonVisible = false ; //default value is true |
- DropDownButtonVisible controls the Dropdown menu button of the tool window, used to show the available window position types:
| DockPanel dockPanel = new DockPanel(); |
| dockPanel.DropDownButtonVisible = false ; //default value is true |
- TabStripVisible controls the bottom tabstrip control of the tool window. This tabstrip is used to control the active dock panel when there is more than one panel on the form:
| DockPanel dockPanel = new DockPanel(); |
| dockPanel.TabStripVisible = false ; //default value is true |
Note: By default the TabStripVisible property is set to true and when the dock panel is the only one in the container, the bottom tabstrip control is visible. If you want the VS-like behavior, you must set it to false.
The TabStripVisible property works on a single dock panel only. When we have more than one dock panel in same container, the tabstrip is always visible.
Comments
If you'd like to comment on this KB
article, please, send us a
Support Ticket.
Thank you!
Please
Sign In
to rate this article.