Export (0) Print
Expand All

MenuItem Members

MenuItem overview

Public Constructors

public constructorMenuItem Constructor

Supported by the .NET Compact Framework.

Overloaded. Initializes a new instance of the MenuItem class.

Public Properties

public propertyBarBreak Gets or sets a value indicating whether the MenuItem is placed on a new line (for a menu item added to a MainMenu object) or in a new column (for a submenu item or menu item displayed in a ContextMenu).
public propertyBreak Gets or sets a value indicating whether the item is placed on a new line (for a menu item added to a MainMenu object) or in a new column (for a menu item or submenu item displayed in a ContextMenu).
public propertyChecked

Supported by the .NET Compact Framework.

Gets or sets a value indicating whether a check mark appears next to the text of the menu item.
public propertyContainer (inherited from Component) Gets the IContainer that contains the Component.
public propertyDefaultItem Gets or sets a value indicating whether the menu item is the default menu item.
public propertyEnabled

Supported by the .NET Compact Framework.

Gets or sets a value indicating whether the menu item is enabled.
public propertyHandle (inherited from Menu) Gets a value representing the window handle for the menu.
public propertyIndex Gets or sets a value indicating the position of the menu item in its parent menu.
public propertyIsParent Overridden. Gets a value indicating whether the menu item contains child menu items.
public propertyMdiList Gets or sets a value indicating whether the menu item will be populated with a list of the Multiple Document Interface (MDI) child windows that are displayed within the associated form.
public propertyMdiListItem (inherited from Menu) Gets a value indicating the MenuItem that is used to display a list of Multiple Document Interface (MDI) child forms.
public propertyMenuItems (inherited from Menu)

Supported by the .NET Compact Framework.

Gets a value indicating the collection of MenuItem objects associated with the menu.
public propertyMergeOrder Gets or sets a value indicating the relative position of the menu item when it is merged with another.
public propertyMergeType Gets or sets a value indicating the behavior of this menu item when its menu is merged with another.
public propertyMnemonic Gets a value indicating the mnemonic character that is associated with this menu item.
public propertyOwnerDraw Gets or sets a value indicating whether the code that you provide draws the menu item or Windows draws the menu item.
public propertyParent

Supported by the .NET Compact Framework.

Gets a value indicating the menu that contains this menu item.
public propertyRadioCheck Gets or sets a value indicating whether the MenuItem, if checked, displays a radio-button instead of a check mark.
public propertyShortcut Gets or sets a value indicating the shortcut key associated with the menu item.
public propertyShowShortcut Gets or sets a value indicating whether the shortcut key that is associated with the menu item is displayed next to the menu item caption.
public propertySite (inherited from Component) Gets or sets the ISite of the Component.
public propertyText

Supported by the .NET Compact Framework.

Gets or sets a value indicating the caption of the menu item.
public propertyVisible Gets or sets a value indicating whether the menu item is visible.

Public Methods

public methodCloneMenu Overloaded. Creates a copy of a MenuItem.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodDispose (inherited from Component) Overloaded. Releases the resources used by the Component.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodGetContextMenu (inherited from Menu) Gets the ContextMenu that contains this menu.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetMainMenu (inherited from Menu) Gets the MainMenu that contains this menu.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodMergeMenu Overloaded. Merges this MenuItem with another MenuItem.
public methodPerformClick Generates a Click event for the MenuItem, simulating a click by a user.
public methodPerformSelect Raises the Select event for this menu item.
public methodToString

Supported by the .NET Compact Framework.

Overridden. See Object.ToString.

Public Events

public eventClick Occurs when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.
public eventDisposed (inherited from Component) Adds an event handler to listen to the Disposed event on the component.
public eventDrawItem Occurs when the OwnerDraw property of a menu item is set to true and a request is made to draw the menu item.
public eventMeasureItem Occurs when the menu needs to know the size of a menu item before drawing it.
public eventPopup Occurs before a menu item's list of menu items is displayed.
public eventSelect Occurs when the user places the cursor over a menu item.

Protected Properties

protected propertyDesignMode (inherited from Component) Gets a value that indicates whether the Component is currently in design mode.
protected propertyEvents (inherited from Component) Gets the list of event handlers that are attached to this Component.
protected propertyMenuID Gets a value indicating the Windows identifier for this menu item.

Protected Methods

protected methodCloneMenu Overloaded. Creates a copy of a MenuItem.
protected methodDispose

Supported by the .NET Compact Framework.

Overloaded. Overridden. See Component.Dispose.
protected methodFinalize (inherited from Component)

Supported by the .NET Compact Framework.

Overridden. Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.
protected methodOnClick Raises the Click event.
protected methodOnDrawItem Raises the DrawItem event.
protected methodOnMeasureItem Raises the MeasureItem event.
protected methodOnPopup Raises the Popup event.
protected methodOnSelect Raises the Select event.

See Also

MenuItem Class | System.Windows.Forms Namespace

Show:
© 2015 Microsoft