This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
ContextMenu Methods
The methods of the ContextMenu class are listed below. For a complete list of ContextMenu class members, see the ContextMenu Members topic.
Public:
Dispose (inherited from Menu) |
Disposes of the component. Call dispose when the component is no longer needed. This method removes the component from its container (if the component has a site) and triggers the dispose event. |
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 (inherited from Menu) |
Merges another menu's items with this one's. Menu items are merged according to their mergeType and mergeOrder properties. This function is typically used to merge an MDI container's menu with that of its active MDI child. |
Show |
Displays the context menu at the specified position. This method doesn't return until the menu is dismissed. |
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. |
ProcessCmdKey (inherited from Menu) |
[To be supplied.] |
Event Hookup:
AddOnPopup |
Adds an event handler for the "popup" event notification. The popup event is fired when the context menu is about to be displayed. The event handler can use this opportunity to add/remove/enable/disable items contained in this menu as appropriate. |
RemoveOnPopup |
Removes the given handler for the "popup" event. |
See Also
ContextMenu Class | System.WinForms Namespace