Export (0) Print
Expand All

MenuItem Members

Represents an individual item that is displayed within a MainMenu or ContextMenu. Although ToolStripMenuItem replaces and adds functionality to the MenuItem control of previous versions, MenuItem is retained for both backward compatibility and future use if you choose.

The following tables list the members exposed by the MenuItem type.

  Name Description
Public method Supported by the .NET Compact Framework MenuItem Overloaded. Initializes a new instance of the MenuItem class.
Top

(see also Protected Properties )
  Name Description
Public property BarBreak 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 property Break 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 property Supported by the .NET Compact Framework Checked Gets or sets a value indicating whether a check mark appears next to the text of the menu item.
Public property Container  Gets the IContainer that contains the Component.(inherited from Component)
Public property DefaultItem Gets or sets a value indicating whether the menu item is the default menu item.
Public property Supported by the .NET Compact Framework Enabled Gets or sets a value indicating whether the menu item is enabled.
Public property Handle  Gets a value representing the window handle for the menu.(inherited from Menu)
Public property Index Gets or sets a value indicating the position of the menu item in its parent menu.
Public property IsParent Overridden. Gets a value indicating whether the menu item contains child menu items.
Public property MdiList 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 property MdiListItem  Gets a value indicating the MenuItem that is used to display a list of multiple document interface (MDI) child forms.(inherited from Menu)
Public property Supported by the .NET Compact Framework MenuItems  Gets a value indicating the collection of MenuItem objects associated with the menu.(inherited from Menu)
Public property MergeOrder Gets or sets a value indicating the relative position of the menu item when it is merged with another.
Public property MergeType Gets or sets a value indicating the behavior of this menu item when its menu is merged with another.
Public property Mnemonic Gets a value indicating the mnemonic character that is associated with this menu item.
Public property Name  Gets or sets the name of the Menu.(inherited from Menu)
Public property OwnerDraw Gets or sets a value indicating whether the code that you provide draws the menu item or Windows draws the menu item.
Public property Supported by the .NET Compact Framework Parent Gets a value indicating the menu that contains this menu item.
Public property RadioCheck Gets or sets a value indicating whether the MenuItem, if checked, displays a radio-button instead of a check mark.
Public property Shortcut Gets or sets a value indicating the shortcut key associated with the menu item.
Public property ShowShortcut 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 property Supported by the .NET Compact Framework Site  Gets or sets the ISite of the Component.(inherited from Component)
Public property Tag  Gets or sets user-defined data associated with the control.(inherited from Menu)
Public property Supported by the .NET Compact Framework Text Gets or sets a value indicating the caption of the menu item.
Public property Visible Gets or sets a value indicating whether the menu item is visible.
Top

  Name Description
Protected property CanRaiseEvents  Gets a value indicating whether the component can raise an event.(inherited from Component)
Protected property DesignMode  Gets a value that indicates whether the Component is currently in design mode.(inherited from Component)
Protected property Supported by the .NET Compact Framework Events  Gets the list of event handlers that are attached to this Component.(inherited from Component)
Protected property MenuID Gets a value indicating the Windows identifier for this menu item.
Top

(see also Protected Methods )
  Name Description
Public method CloneMenu Overloaded. Creates a copy of a MenuItem.
Public method CreateObjRef  Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method Supported by the .NET Compact Framework Dispose Overloaded.  
Public method Supported by the .NET Compact Framework Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method FindMenuItem  Gets the MenuItem that contains the value specified. (inherited from Menu)
Public method GetContextMenu  Gets the ContextMenu that contains this menu. (inherited from Menu)
Public method Supported by the .NET Compact Framework GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetLifetimeService  Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method GetMainMenu  Gets the MainMenu that contains this menu. (inherited from Menu)
Public method Supported by the .NET Compact Framework GetType  Gets the Type of the current instance. (inherited from Object)
Public method InitializeLifetimeService  Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method MergeMenu Overloaded. Merges this MenuItem with another MenuItem.
Public method PerformClick Generates a Click event for the MenuItem, simulating a click by a user.
Public method PerformSelect Raises the Select event for this menu item.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Supported by the .NET Compact Framework ToString Overridden. Returns a string that represents the MenuItem.
Top

  Name Description
Protected method CloneMenu Overloaded. Creates a copy of a MenuItem.
Protected method CreateMenuHandle  Creates a new handle to the Menu. (inherited from Menu)
Protected method Supported by the .NET Compact Framework Dispose Overloaded. Overridden.  
Protected method Supported by the .NET Compact Framework Finalize  Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (inherited from Component)
Protected method FindMergePosition  Returns the position at which a menu item should be inserted into the menu. (inherited from Menu)
Protected method GetService  Returns an object that represents a service provided by the Component or by its Container. (inherited from Component)
Protected method Supported by the .NET Compact Framework MemberwiseClone  Overloaded. (inherited from MarshalByRefObject)
Protected method Supported by the .NET Compact Framework OnClick Raises the Click event.
Protected method OnDrawItem Raises the DrawItem event.
Protected method OnInitMenuPopup Raises the Popup event.
Protected method OnMeasureItem Raises the MeasureItem event.
Protected method Supported by the .NET Compact Framework OnPopup Raises the Popup event.
Protected method OnSelect Raises the Select event.
Protected method ProcessCmdKey  Processes a command key. (inherited from Menu)
Top

  Name Description
Public event Supported by the .NET Compact Framework Click Occurs when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.
Public event Supported by the .NET Compact Framework Disposed  Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Public event DrawItem Occurs when the OwnerDraw property of a menu item is set to true and a request is made to draw the menu item.
Public event MeasureItem Occurs when the menu needs to know the size of a menu item before drawing it.
Public event Supported by the .NET Compact Framework Popup Occurs before a menu item's list of menu items is displayed.
Public event Select Occurs when the user places the pointer over a menu item.
Top

Community Additions

ADD
Show:
© 2015 Microsoft