MenuItemCollection

Collection<1>References
Collection for menu items.

Methods

Add

#
public MenuItem Add(Command command, int order = 0)
Add the specified command with the specified order.

Add

#
public void Add(MenuItem item)
Adds a menu item to the specified collection based on its Order.

AddRange

#
public void AddRange(IEnumerable<Command> commands, int order = 0)
Adds the specified commands to the collection starting at the specified order.

AddRange

#
public void AddRange(IEnumerable<MenuItem> items)
Adds the specified menu items to the collection.

AddSeparator

#
public void AddSeparator(int order = 0)
Adds the separator with the specified order.

GetSubmenu

#
public ButtonMenuItem GetSubmenu(string submenuText, int order = 0, bool plaintextMatch = true, bool create = true)
Gets the submenu from the collection with the specified text, optionally creating one if not found.
submenuText (string)Text of the submenu to find or add.
order (int = 0)Order of the submenu item to add. Not used if there is already a submenu with the specified text.
plaintextMatch (bool = true)If set to true, matches excluding any mnemonic symbol idenfifiers.
create (bool = true)If set to true, creates the menu if it doesn't exist in the collection, otherwise false.
The submenu instance if found, or a new submenu instance added at the specified order.

InsertItem

#
protected override void InsertItem(int index, MenuItem item)
Inserts an menu item at the specified index

RemoveItem

#
protected override void RemoveItem(int index)
Removes the item at the specified index.