Share via


How to: Create Menu Items and Navigation Groups

Menus and navigation groups in a Visual Studio LightSwitch–based application appear on the Navigation Menu at run time. Menus and navigation groups are managed in the Screen Navigation tab of the Application Designer.

Menu items are automatically added to the Navigation Menu for most screens that you create. Some screen types, such as the Details Screen, do not appear in the menu; they can be opened only by using a Command that calls the Application.ShowScreenName method. Menu items can be renamed. Renaming a menu item does not change the name or display name of the screen.

By default all menu items appear in a single Tasks group. You can rename the group, and you can create additional navigation groups and move menu items among them. You can also change the order of navigation groups. You can remove menu items that you do not want to display, and you can add a menu item to multiple navigation groups.

You can also specify the Startup Screen on the Screen Navigation tab. This is the screen that appears when the application starts; the menu item for the Startup Screen appears in bold text on the Navigation Menu.

To add a menu item

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, select the navigation group node to which you want to add the menu item.

  4. Click the Include Screen drop-down list and then click the menu item that you want to add.

    The menu item is added to the bottom of the selected navigation group in the navigation menu.

To remove a menu item

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, right-click the menu item and then click Delete.

    The menu item is removed from the navigation menu.

To rename a menu item

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, right-click the menu item that you want to rename and then click Rename.

    The name field becomes editable.

  4. Type the new name for the menu item and then press Enter.

To reorder menu items

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, select the menu item node that you want to move.

  4. In the right margin of the designer, click the Move Up or Move Down button.

    Note

    You cannot move a menu item between navigation groups. You must remove it from one group and then add it to another.

To add a navigation group

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, click the Add Group node.

    A new navigation group named Group appears.

  4. Select Group and enter a new name for the navigation group, and then press Enter.

To remove a navigation group

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, right-click the navigation group node and then click Delete.

    The navigation group and any menu items that it contains are removed from the navigation menu.

To rename a navigation group

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, right-click the navigation group that you want to rename and then click Rename.

    The name field becomes editable.

  4. Type the new name for the navigation group and then press Enter.

To reorder navigation groups

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, select the navigation group node that you want to move.

  4. Click the Move Up button or Move Down button to move it above or below another navigation group node.

To change the startup screen

  1. In Solution Explorer, select the Screens node.

  2. On the Project menu, click Edit Screen Navigation.

    The Screen Navigation tab of the Application Designer appears.

  3. On the Screen Navigation tab, select the menu item that you want to use as a Startup Screen.

  4. Click the Set button at the bottom of the Application Designer.

    The menu item appears in bold text, signifying that it is now the Startup Screen.

    Note

    If you do not want a Startup Screen for your application, you can click the Clear button. If you subsequently add a new screen to the application, it will automatically become the Startup Screen and you will need to perform this step again.

See Also

Tasks

How to: Manage Application Settings

How to: Add a Custom Command to a Silverlight Screen

How to: Manage Application Settings