NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MenuItem Methods

The methods of the MenuItem class are listed below. For a complete list of MenuItem class members, see the MenuItem Members topic.

Public:

CloneMenu Overloaded. Creates a copy of the menu item.
Dispose Disposes the MenuItem.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
FindMenuItem (inherited from Menu) [To be supplied.]
GetContainer (inherited from MarshalByRefComponent) Returns the component's container.
GetDesignMode (inherited from MarshalByRefComponent) Determines whether the component is currently in design mode.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) This method is used return a lifetime service object that is used to control the lifetime policy to the object. For the default Lifetime service this will be an object of type ILease.
GetMainMenu (inherited from Menu) Returns the MainMenu item that contains this menu. The MainMenu is at the top of this menu's parent chain. Returns null if this menu is not contained in a MainMenu. This can occur if it's contained in a ContextMenu or if it isn't currently contained in any menu at all.
GetServiceObject (inherited from MarshalByRefComponent) The implementation of IServiceObjectProvider
GetType (inherited from Object) Gets the Type of the Object.
InitializeLifetimeService (inherited from MarshalByRefObject)  
MergeMenu Overloaded. Merges this menu item with another menu item.
PerformClick Generates a System.WinForms.Control.Click event for the MenuItem, simulating a click by a user.
PerformSelect Raises the System.WinForms.MenuItem.Select event for this menu item.
ToString (inherited from Menu) Returns a string representation for this control.

Protected:

CloneMenu (inherited from Menu) Sets this menu to be an identical copy of another menu.
CreateMenuHandle (inherited from Menu) [To be supplied.]
Finalize (inherited from Menu) [To be supplied.]
FindMergePosition (inherited from Menu) [To be supplied.]
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
OnClick Raises the System.WinForms.MenuItem.Click event.
OnDrawItem Raises the System.WinForms.MenuItem.DrawItem event.
OnMeasureItem Raises the System.WinForms.MenuItem.MeasureItem event.
OnPopup Raises the System.WinForms.MenuItem.Popup event.
OnSelect Raises the System.WinForms.MenuItem.Select event.
ProcessCmdKey (inherited from Menu) [To be supplied.]

Event Hookup:

AddOnClick Adds an event handler for the event.
AddOnDrawItem Adds an event handler for the event.
AddOnMeasureItem Adds an event handler for the event.
AddOnPopup Adds an event handler for the event.
AddOnSelect Adds an event handler for the event.
RemoveOnClick Removes an event handler that has been associated with the System.WinForms.MenuItem.Click event.
RemoveOnDrawItem Removes an event handler that has been associated with the System.WinForms.MenuItem.DrawItem event.
RemoveOnMeasureItem Removes an event handler that has been associated with the System.WinForms.MenuItem.MeasureItem event.
RemoveOnPopup Removes an event handler that has been associated with the System.WinForms.MenuItem.Popup event.
RemoveOnSelect Removes an event handler that has been associated with the System.WinForms.MenuItem.Select event.

See Also

MenuItem Class | System.WinForms Namespace