docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Popover

    A popup usually anchored to another UI element.

    Inheritance
    object
    Popup
    Popup<Popover>
    AnchorPopup<Popover>
    Popover
    Inherited Members
    AnchorPopup<Popover>.placement
    AnchorPopup<Popover>.currentPlacement
    AnchorPopup<Popover>.offset
    AnchorPopup<Popover>.crossOffset
    AnchorPopup<Popover>.containerPadding
    AnchorPopup<Popover>.shouldFlip
    AnchorPopup<Popover>.arrowVisible
    AnchorPopup<Popover>.outsideClickDismissEnabled
    AnchorPopup<Popover>.outsideScrollEnabled
    AnchorPopup<Popover>.outsideClickStrategy
    AnchorPopup<Popover>.anchor
    AnchorPopup<Popover>.SetPlacement(PopoverPlacement)
    AnchorPopup<Popover>.SetOffset(int)
    AnchorPopup<Popover>.SetCrossOffset(int)
    AnchorPopup<Popover>.SetContainerPadding(int)
    AnchorPopup<Popover>.SetShouldFlip(bool)
    AnchorPopup<Popover>.SetArrowVisible(bool)
    AnchorPopup<Popover>.SetAnchor(VisualElement)
    AnchorPopup<Popover>.SetOutsideClickDismiss(bool)
    AnchorPopup<Popover>.SetOutsideScrollEnabled(bool)
    AnchorPopup<Popover>.SetOutsideClickStrategy(OutsideClickStrategy)
    Popup<Popover>.shown
    Popup<Popover>.dismissed
    Popup<Popover>.SetKeyboardDismiss(bool)
    Popup<Popover>.SetLastFocusedElement(Focusable)
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.Dismiss()
    Popup.Dismiss(DismissType)
    Popup.Show()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public sealed class Popover : AnchorPopup<Popover>

    Properties

    modalBackdrop

    Enable or disable the blocking of outside click events.

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

    Methods

    Build(VisualElement, VisualElement)

    Build a new Popover instance.

    Declaration
    public static Popover Build(VisualElement referenceView, VisualElement contentView)
    Parameters
    Type Name Description
    VisualElement referenceView

    An arbitrary UI element in the current panel.

    VisualElement contentView

    The content that will appear inside this popup.

    Returns
    Type Description
    Popover

    The Popover instance.

    GetFocusableElement()

    Returns the element that will be focused when the view will become visible.

    The default value is `null`.

    Declaration
    protected override VisualElement GetFocusableElement()
    Returns
    Type Description
    VisualElement

    The element that will be focused when the view will become visible.

    Overrides
    Popup.GetFocusableElement()

    GetMovableElement()

    Method which must return the visual element that needs to be moved, based on the anchor position and size.

    Declaration
    protected override VisualElement GetMovableElement()
    Returns
    Type Description
    VisualElement

    The visual element which will be moved. The default value is view.

    Overrides
    AnchorPopup<Popover>.GetMovableElement()

    InvokeDismissedEventHandlers(DismissType)

    Called when the popup has been dismissed. This method will invoke any handlers attached to the dismissed event.

    Declaration
    protected override void InvokeDismissedEventHandlers(DismissType reason)
    Parameters
    Type Name Description
    DismissType reason
    Overrides
    AnchorPopup<Popover>.InvokeDismissedEventHandlers(DismissType)

    SetModalBackdrop(bool)

    Enable or disable the blocking of outside click events.

    Declaration
    public Popover SetModalBackdrop(bool enableModalBackdrop)
    Parameters
    Type Name Description
    bool enableModalBackdrop

    Whether to enable the blocking of outside click events.

    Returns
    Type Description
    Popover

    The Popover instance.

    ShouldAnimate()

    Implement this method to know if the popup should call AnimateViewIn() and AnimateViewOut(DismissType) methods or not.

    Declaration
    protected override bool ShouldAnimate()
    Returns
    Type Description
    bool

    True if you want to animate the popup, False otherwise.

    Overrides
    Popup.ShouldAnimate()
    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)