/// <summary> /// Adds a MenuItem to the Menu using a specified name. /// </summary> /// <param name="name">The MenuItem can be referenced by this name.</param> /// <param name="item">A MenuItem that will belong to this menu.</param> public void Add(String name, MenuItem item) { item.Name = name; menuItemCollection.Add(item); }
/// <summary> /// Removes a MenuItem from the Menu by object reference /// </summary> /// <param name="item">A MenuItem that currently belongs to the Menu.</param> public void Remove(MenuItem item) { menuItemCollection.Remove(item); }
/// <summary> /// Adds a MenuItem to the Menu using a default name. /// </summary> /// <param name="item">A MenuItem that will belong to this menu.</param> public void Add(MenuItem item) { menuItemCollection.Add(item); }