Nevron Open Vision Documentation
User Interface / Widgets / Ribbon / Application Menu
In This Topic
    Application Menu
    In This Topic

    The application menu of a NOV ribbon is the drop down menu placed to the left of the ribbon tab headers. It fulfils the role of the File menu in traditional menu based UIs.


    NOV ribbon application menu is accessible through the ApplicationMenu property of the ribbon tab and consists of 3 parts:

    • Menu Pane - this is an ordinary menu (NMenu instance) and just like other menus its Items collection can be used to specify the menu items of the menu and their sub items. Typically large icons (32x32 pixels) are used for the items of this menu.
    • Content Pane - can be any widget, but most commonly the content pane is used to show a list of recent files/items to the user. By default is null, which means that a content pane will not be shown.
    • Footer Pane - a right aligned wrap flow panel, which typically holds some configuration buttons and an "Exit" button. By default is null, which means that a footer panes will not be shown. If you want to show a footer in your application menu, set its FooterPane property to an instance of the NApplicationMenuFooterPanel class as shown in the code example below.

    The following code demonstrates how to create the application menu shown in the prevoius section:

    Application Menu Example
    Copy Code
    NApplicationMenu appMenu = new NApplicationMenu("File");
    NMenu menu = appMenu.MenuPane;
    // Create the "Open" and "Save" menu items
    menu.Items.Add(new NMenuItem(NResources.Image_32x32_folder_action_open_png, "Open"));
    menu.Items.Add(new NMenuItem(NResources.Image_32x32_save_png, "Save"));
    // Create the "Save As" menu item and its sub items
    NMenuItem saveAsMenuItem = new NMenuItem(NResources.Image_32x32_save_as_png, "Save As");
    saveAsMenuItem.Items.Add(new NMenuItem("PNG Image"));
    saveAsMenuItem.Items.Add(new NMenuItem("JPEG Image"));
    saveAsMenuItem.Items.Add(new NMenuItem("BMP Image"));
    saveAsMenuItem.Items.Add(new NMenuItem("GIF Image"));
    // Create the rest of the menu items
    menu.Items.Add(new NMenuSeparator());
    menu.Items.Add(new NMenuItem(NResources.Image_32x32_print_png, "Print"));
    menu.Items.Add(new NMenuItem(NResources.Image_32x32_settings_options_png, "Options"));
    menu.Items.Add(new NMenuSeparator());
    menu.Items.Add(new NMenuItem(NResources.Image_32x32_delete_png, "Exit"));
    // Create a label for the content pane
    appMenu.ContentPane = new NLabel("This is the content pane");
    // Create two buttons for the footer pane
    appMenu.FooterPane = new NApplicationMenuFooterPanel();
    appMenu.FooterPane.Add(new NButton("Options..."));
    appMenu.FooterPane.Add(new NButton("Exit"));
    See Also