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>.SetContainerView(VisualElement)
    Popup<Popover>.SetKeyboardDismiss(bool)
    Popup<Popover>.SetLastFocusedElement(Focusable)
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.containerView
    Popup.referenceView
    Popup.contentView
    Popup.rootView
    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

    resizable

    True if the popup is resizable, False otherwise. Default is False.

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

    When the Popup is set to resizable, it will be resizable by dragging the bottom right corner.

    resizeDirection

    The direction of the drag.

    Declaration
    public Draggable.DragDirection resizeDirection { get; set; }
    Property Value
    Type Description
    Draggable.DragDirection

    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.

    Exceptions
    Type Condition
    ArgumentNullException

    If the referenceView is null.

    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
    public override VisualElement GetMovableElement()
    Returns
    Type Description
    VisualElement

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

    Overrides
    AnchorPopup<Popover>.GetMovableElement()

    HideView(DismissType)

    Called when it is time to hide the popup.

    Declaration
    protected override void HideView(DismissType reason)
    Parameters
    Type Name Description
    DismissType reason

    The reason why the popup should be dismissed.

    Overrides
    AnchorPopup<Popover>.HideView(DismissType)

    InvokeShownEventHandlers()

    Called when the popup has become visible. This method will invoke any handlers attached to the shown event.

    Declaration
    protected override void InvokeShownEventHandlers()
    Overrides
    Popup<Popover>.InvokeShownEventHandlers()

    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.

    SetResizable(bool)

    Set the popup as resizable.

    Declaration
    public Popover SetResizable(bool isResizable)
    Parameters
    Type Name Description
    bool isResizable

    True to activate the feature, False otherwise.

    Returns
    Type Description
    Popover

    The popover instance.

    See Also
    resizable

    SetResizeDirection(DragDirection)

    Set the resize direction of the popover.

    Declaration
    public Popover SetResizeDirection(Draggable.DragDirection direction)
    Parameters
    Type Name Description
    Draggable.DragDirection direction

    The direction of the resize.

    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()

    ShouldRefreshPosition()

    Method to determine if the position of the popup should be refreshed every time the anchor or the popup's content geometry changes.

    Declaration
    protected override bool ShouldRefreshPosition()
    Returns
    Type Description
    bool

    True if the position should be refreshed, False otherwise.

    Overrides
    AnchorPopup<Popover>.ShouldRefreshPosition()
    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)