System.Windows.Forms.Menu.MenuItems Property

Gets a value indicating the collection of System.Windows.Forms.MenuItem objects associated with the menu.

Syntax

[System.ComponentModel.MergableProperty(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
[System.ComponentModel.Browsable(false)]
public Menu.MenuItemCollection MenuItems { get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can use this property to obtain a reference to the list of menu items that are currently stored in the menu. For System.Windows.Forms.MainMenu and System.Windows.Forms.ContextMenu objects, the Menu.MenuItems property contains the entire menu structure in the control. For the System.Windows.Forms.MenuItem class, the Menu.MenuItems property contains the list of submenu items associated with the System.Windows.Forms.MenuItem. With the reference to the collection of menu items for the menu (provided by this property), you can add and remove menu items, determine the total number of menu items, and clear the list of menu items from the collection. For more information on maintaining the menu item collection for a menu, see the System.Windows.Forms.Menu.MenuItemCollection documentation.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0