ComponentOne Menus and Toolbars for WinForms
Docking and Floating Toolbars
Menus and Toolbars Overview > Toolbars Appearance and Behavior > Docking and Floating Toolbars

Toolbars can be docked to the top, left, right or bottom on the container that the C1CommandDock has been assigned to.

Each C1ToolBar resides inside the docking area when it is docked. Toolbars can be moved to different docking areas by using a drag-and-drop operation, and they can also be resized.


 

If you are creating a C1ToolBar programmatically and would like to use the C1CommandDock to enable docking and floating behavior you would add the toolbar to the C1CommandDock like the following:

To write code in Visual Basic

Visual Basic
Copy Code
Me.C1CommandDock = New C1.Win.C1Command.C1CommandDock()
Me.C1CommandDock.Controls.Add(Me.C1ToolBar1)
Me.Controls.Add(Me.C1CommandDock)

To write code in C#

C#
Copy Code
this.c1CommandDock = new C1.Win.C1Command.C1CommandDock();
this.c1CommandDock.Controls.Add(this.c1ToolBar1);
this.Controls.Add(this.c1CommandDock);
See Also