ContextMenu Class

A class that owns context menu items.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.UIContextMenu

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ContextMenu : IDisposable

The ContextMenu type exposes the following members.

Constructors
 NameDescription
Public methodContextMenu Default constructor
Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
 NameDescription
Public methodAddItem Add an item to the Context Menu.
Public methodDisposeReleases all resources used by the ContextMenu
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

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

See Also