Nevron .NET Vision
User Interface for .NET / User's Guide / Command Bars / Tutorials / Docking Toolbars Framework

In This Topic
    Docking Toolbars Framework
    In This Topic

    The following tutorial will describe how to create and customize a docking toolbars framework at design-time:

     

    1. Create manager:

      From the toolbox drop a NCommandBarsManager component on the form. A new NCommandBarsManager instance will be initialized and it will automatically assign the form as its ParentControl.
    2. Create Ranges (optionally):

      If you want to group command contexts by ranges, use the Ranges collection of the manager to create desired ones:



      Do not forget to specify unique id for each range. The LowerBound and UpperBound properties are not used by Nevron Command Bars.

    3. Create Command Contexts:

      Nevron Command Contexts provide the common functionality and appearance for a NCommand object. Use the Contexts collection of the manager to create command contexts and customize their appearance. Each NCommandContext provides common NCommandProperties to be used by a NCommand instance created from that context.


      Specify the range id this context belongs to


      Edit the properties that will be used by commands created from this context.

      You can create nested contexts using each context's Contexts property. Each command created from a context with nested children will also contain nested commands.
    4. Creating Toolbars:

      Adding toolbars at design-time is the same as adding toolbars at run-time using the advanced visual editor. Use the "ShowEditor" verb of the NCommandBarsManager designer to trigger the editor. For more information about using this editor see Using The Advanced Visual Editor.
    5. Dropping Contexts:

      Use the "ShowEditor" verb to display the manager's editor. Select the "Commands" page:


      This is how contexts and ranges are organized in the "Commands" page


      Using drag-and-drop, select a context from the "Commands" listbox and drop it on a toolbar to create a NCommand instance which will share this context.
    6. Specify Default Range:

      Each NCommandParent can be assigned a default range id which is used with the Reset method of this parent. If such a range is specified, the parent will get all contexts from this range and create commands from them.


    7. Reposition Toolbars:

      Using the Dock property of each toolbar, specify on which toolbar dock it should be positioned. Use the left mouse button to reposition toolbars within dock.
    8. Keyboard Support:

      Each NCommand instance can be assigned a valid keyboard shortcut combination. A valid shortcut is any combination of modifier keys and a keys value. Use the "Keyboard" button on the visual editor to assign shortcuts to contexts.



      The "Keyboard" editor works only on the Contexts collection of the manager.
    See Also