Table of Contents

Method AddMenuItem

Namespace
Innova.Prism.Library.Controls.Menu
Assembly
Innova.Prism.Library.dll

AddMenuItem(ICollection<MenuItemViewModel>, string, Action, string, ImageSource, int)

Adds a new menu item to the collection.

public static MenuItemViewModel AddMenuItem(this ICollection<MenuItemViewModel> items, string title, Action action = null, string description = null, ImageSource imageSource = null, int sortOrder = 0)

Parameters

items ICollection<MenuItemViewModel>

The collection of menu items.

title string

The title of the menu item.

action Action

The action to be executed when the menu item is clicked.

description string

The description of the menu item.

imageSource ImageSource

The image source of the menu item.

sortOrder int

The sort order of the menu item.

Returns

MenuItemViewModel

The newly added MenuItemViewModel.