Class Menu
Menu UI element.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Menu : BaseVisualElement, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
Menu()
Default constructor.
Declaration
public Menu()
Fields
containerUssClassName
The Menu container styling class.
Declaration
public const string containerUssClassName = "appui-menu__container"
Field Value
Type | Description |
---|---|
string |
selectableUssClassName
The Menu selectable mode styling class.
Declaration
public const string selectableUssClassName = "appui-menu--selectable"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Menu main styling class.
Declaration
public const string ussClassName = "appui-menu"
Field Value
Type | Description |
---|---|
string |
Properties
contentContainer
The content container of the Menu.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
parentItem
The parent MenuItem of this Menu (if this Menu is a sub-menu).
Declaration
public MenuItem parentItem { get; }
Property Value
Type | Description |
---|---|
MenuItem |
Methods
CloseSubMenus()
Close all sub-menus.
Declaration
public void CloseSubMenus()
GetMenuItems()
Get all the MenuItems of this Menu (including sub-menus).
Declaration
public IEnumerable<MenuItem> GetMenuItems()
Returns
Type | Description |
---|---|
IEnumerable<MenuItem> | The list of MenuItems. |