Class AnchorPopupUtils
Utility class to compute the position of a popup based on the anchor's position and size.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public static class AnchorPopupUtils
Methods
ComputePosition(VisualElement, VisualElement, Panel, PositionOptions)
This method will return the possible position of UI element based on a specific context.
Declaration
public static PositionResult ComputePosition(VisualElement element, VisualElement anchor, Panel panel, PositionOptions options)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | element | The element which needs to be positioned |
VisualElement | anchor | The element used as an anchor for the element. |
Panel | panel | The panel containing elements. |
PositionOptions | options | The options used to compute the position. |
Returns
Type | Description |
---|---|
PositionResult | The computed position. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The provided |