2026 Class
Changes 5
C

ContextMenu

Description:
A class that owns context menu items.
Remarks:

There are three types of menu items (CommandMenuItem, SubMenuItem, SeparatorItem) that can be added to a ContextMenu object.

Inheritance Hierarchy:
System.Object
  Autodesk.Revit.UI.ContextMenu
public class ContextMenu : IDisposable
Name Return Type Description Inherited From
C ContextMenu() None Default constructor
Name Return Type Description Inherited From
M AddItem(MenuItem) None Add an item to the Context Menu.
M Dispose() None Releases all resources used by the ContextMenu
M Equals None Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
M GetHashCode None Serves as the default hash function. (Inherited from Object ) Object
M GetType None Gets the Type of the current instance. (Inherited from Object ) Object
M ToString None Returns a string that represents the current object. (Inherited from Object ) Object
Name Return Type Description Inherited From
P IsValidObject Boolean Specifies whether the .NET object represents a valid Revit entity.