Class MenuTrigger
A wrapper to display a menu when a trigger has been activated.
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 MenuTrigger : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
MenuTrigger()
Default constructor.
Declaration
public MenuTrigger()
Properties
anchor
The UI element used as an anchor for the menu's popover.
Declaration
public VisualElement anchor { get; set; }
Property Value
Type | Description |
---|---|
VisualElement |
closeOnSelection
Whether the menu should close when a selection is made.
Declaration
public bool closeOnSelection { get; set; }
Property Value
Type | Description |
---|---|
bool |
menu
The menu to display.
Declaration
public Menu menu { get; }
Property Value
Type | Description |
---|---|
Menu |
trigger
The trigger used to determine when to display them menu.
Declaration
public VisualElement trigger { get; }
Property Value
Type | Description |
---|---|
VisualElement |