ComponentOne Menus and Toolbars for WinForms
Menus and Toolbars for WinForms Task-Based Help / ToolBar Tasks / Specifying a Docking/Floating Position
In This Topic
    Specifying a Docking/Floating Position
    In This Topic

    This topic demonstrates how to specify a position for your C1CommandDock in code.

    To dock your toolbar to the top, enter the following code:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    dock.Dock = DockStyle.Top
    

    To write code in C#

    C#
    Copy Code
    dock.Dock = DockStyle.Top;
    
    Note: If you want to dock your toolbar to the bottom, left, or right, change the Top parameter to its desired position: Bottom, Left or Right.
    See Also