Method Add
Add(string, Command)
Adds a new menu item with the specified title and command to the menu.
public virtual MenuItem Add(string title, Command command)
Parameters
titlestringThe title of the menu item.
commandCommandThe command to execute when the menu item is clicked.
Returns
- MenuItem
The created menu item.
Add(string, Action)
Creates and adds new item to Items collection.
public virtual MenuItem Add(string title, Action onClick)
Parameters
Returns
- MenuItem
Created item.