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
itemsICollection<MenuItemViewModel>The collection of menu items.
titlestringThe title of the menu item.
actionActionThe action to be executed when the menu item is clicked.
descriptionstringThe description of the menu item.
imageSourceImageSourceThe image source of the menu item.
sortOrderintThe sort order of the menu item.
Returns
- MenuItemViewModel
The newly added MenuItemViewModel.