ContextMenu Class


Context Menu Class

A class that owns context menu items.
Inheritance Hierarchy
System Object
Autodesk.Revit.UI ContextMenu

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
Name Description
Public method ContextMenu Default constructor
Top
Properties
Name Description
Public property IsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
Name Description
Public method AddItem Add an item to the Context Menu.
Public method Dispose Releases all resources used by the ContextMenu
Public method Equals Determines whether the specified object is equal to the current object.
(Inherited from Object )
Public method GetHashCode Serves as the default hash function.
(Inherited from Object )
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method ToString Returns 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