Rules for DisplayMenuAsRibbonBar

The RibbonBar will use the same structure as the menu. Currently up to 4 levels of menus can be converted.


Menus

  • The top-level (1st-level) menus will display as categories.

  • The 2nd-level menus will display as buttons, in the panel in the corresponding category.

    • The button can be a small button or a large button depending on the ButtonImageSize property of the menu item. The default value is small button.

    • The buttons will be divided and placed into different panels according to the menu separator line. If no menu separator line is used in the original menu, then only one panel will be added.

    • The panel will use the value of the PanelText property of the first menu item as the panel name and the name will display at the footer area of each panel. If not specified, the name of the first menu item in the panel is used as the panel name by default.

    • The button will display the image specified by the ButtonImage property of that menu item. If no image is specified, for the contemporary style menu, the MenuImage property of the menu item will be used, otherwise, the system default image will be displayed.


  • If the 2nd-level menu has sub-menus (3rd-level menus), the 3rd-level menu will display as dropdown menu (ribbon menu). The dropdown menu will display the image specified by the ButtonImage property of that submenu item.

  • If the 3rd-level menu has sub-menus (4th-level menus), the 4th-level menu will display as dropdown menu. The dropdown menu will display the image specified by the ButtonImage property of that submenu item.

  • Currently only up to 4 levels of menus will be automatically displayed in the ribbon bar.

  • When a sheet list is available and the ShowSheetList property is set to true, a new panel called OpenSheet will be displayed as the last panel in the first category and a SheetList button (whose tag is SheetList) with a dropdown menu that contains a list of opened sheets will be displayed in that panel.

Toolbars

  • Toolbars are displayed as QuickAccessToolbar. For rules of displaying Toolbar as QuickAccessToolbar, refer to QuickAccessToolbar.

Font

  • The font face and font size will stay the same as the original menu. If it is a traditional style menu (which has no font settings), the default font face and size of the ribbon bar will be used, which is Tahoma, 12.

Events and properties

  • The functions, events, and properties of the original menu will still be supported after the menu is displayed as a ribbon bar. For more information, refer to Functions, events, and properties.

Size

  • Supports maximizing and minimizing the RibbonBar, and automatically adjusts the size of the MDIClient area and the RibbonBar position. For more information, refer to section Window size.

Shortcut keys and accelerator keys:

  • If shortcut keys are set in the menu, they are automatically synchronized to the RibbonBar control. Note that RibbonBar does not support dynamically modifying shortcut keys (actually, menu itself does not support dynamically setting shortcut keys either).

  • However, the accelerator keys will not be synchronized and supported in the RibbonBar. If the menu Text property includes an accelerator key, such as "&New", after displayed as RibbonBar, the displayed text will be "New", the N letter will not have an underscore to indicate the accelerator key.

    Note that special characters such as "<" display in XML format as "&lt;".