docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DialogTrigger

    DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's open state with the trigger's press state. Additionally, it allows you to customize the type and positioning of the Dialog.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    DialogTrigger
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.scaleOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    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)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public class DialogTrigger : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement

    Constructors

    DialogTrigger()

    Default constructor.

    Declaration
    public DialogTrigger()

    Properties

    anchor

    The UI element used as an anchor. This is only useful for presentations using popups of type AnchorPopup<T>.

    Declaration
    public VisualElement anchor { get; set; }
    Property Value
    Type Description
    VisualElement

    containerPadding

    The padding in pixels of the content inside the Popup.

    Declaration
    public int containerPadding { get; set; }
    Property Value
    Type Description
    int

    contentContainer

    The content container of the DialogTrigger.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    crossOffset

    The offset in pixels in the direction of the placement secondary vector.

    Declaration
    public int crossOffset { get; set; }
    Property Value
    Type Description
    int

    dialog

    The dialog to display.

    Declaration
    public Dialog dialog { get; }
    Property Value
    Type Description
    Dialog

    hideArrow

    Should the arrow be hidden. This property is only useful with Popover presentation type.

    Declaration
    public bool hideArrow { get; set; }
    Property Value
    Type Description
    bool

    isOpen

    The open state of the dialog.

    Declaration
    public bool isOpen { get; }
    Property Value
    Type Description
    bool

    keyboardDismissDisabled

    Disallow the use of Escape key or Return button to dismiss the dialog.

    Declaration
    public bool keyboardDismissDisabled { get; set; }
    Property Value
    Type Description
    bool

    mobileType

    The type of presentation used for this dialog element on mobile platforms.

    Declaration
    public MobilePopupPresentationType mobileType { get; set; }
    Property Value
    Type Description
    MobilePopupPresentationType

    modalBackdrop

    Enable or disable the blocking of the UI behind the dialog.

    Declaration
    public bool modalBackdrop { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    This property works only with Popover presentation type.

    offset

    The offset in pixels in the direction of the placement primary vector.

    Declaration
    public int offset { get; set; }
    Property Value
    Type Description
    int

    outsideClickDismissEnabled

    Allow the use of clicking outside the dialog to dismiss it.

    Declaration
    public bool outsideClickDismissEnabled { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    This property works only with Popover presentation type.

    placement

    The placement of the Popover. This is only useful for presentations using popups of type AnchorPopup<T>.

    Declaration
    public PopoverPlacement placement { get; set; }
    Property Value
    Type Description
    PopoverPlacement

    shouldFlip

    Should the Popover placement be flipped if there's not enough space.

    Declaration
    public bool shouldFlip { get; set; }
    Property Value
    Type Description
    bool

    transitionDuration

    The duration of the transition in milliseconds.

    Declaration
    public int transitionDuration { get; set; }
    Property Value
    Type Description
    int

    trayPosition

    The position of the Tray element. This property is useful only if you set the type property to Tray.

    Declaration
    public TrayPosition trayPosition { get; set; }
    Property Value
    Type Description
    TrayPosition

    trigger

    The trigger that will be used to start the display of the dialog element.

    Declaration
    public VisualElement trigger { get; }
    Property Value
    Type Description
    VisualElement

    type

    The type of presentation used for this dialog element. Some types are not available on mobile, to specify different presentation on mobile context use the mobileType property.

    Declaration
    public PopupPresentationType type { get; set; }
    Property Value
    Type Description
    PopupPresentationType

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)