Method AddMenuItem
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
stringThe title of the menu item.
action
ActionThe action to be executed when the menu item is clicked.
description
stringThe description of the menu item.
imageSource
ImageSourceThe image source of the menu item.
sortOrder
intThe sort order of the menu item.
Returns
- MenuItemViewModel
The newly added MenuItemViewModel.