Share

ContextMenu 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: 26.2.0.0 (26.2.0.0)

Syntax

C#

public class ContextMenu : IDisposable

The ContextMenu type exposes the following members.

Constructors

 NameDescription
Public methodContextMenu Default constructor

Properties

 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.

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)

Remarks

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

See Also

Reference

Was this information helpful?