Interface IPopup
A transient native popup surface acquired via GetService<IPopup>().
Each call returns a new instance backed by a platform-specific child window,
which can extend beyond the parent window bounds.
public interface IPopup : IDisposable
- Inherited Members
Remarks
Available on platforms that support native popups (Windows, macOS). For cross-platform in-window overlays that work on all platforms including mobile, web, and simulators, use IOverlay instead.
Usage pattern (similar to IImage):
var popup = this.GetService<IPopup>();
popup.Show(content, anchorRect, PopupPlacement.Below);
The popup auto-dismisses when the user clicks outside. Disposing the popup closes it if still visible.
Properties
IsVisible
Whether the popup is currently visible.
bool IsVisible { get; }
Property Value
Methods
Close()
Closes the popup if visible.
void Close()
Show(View, Rect, PopupPlacement, Size?, PopupEffect)
Shows the popup with the given content, positioned relative to
anchorRect (in the owning window's coordinate space).
void Show(View content, Rect anchorRect, PopupPlacement placement = PopupPlacement.Below, Size? size = null, PopupEffect effect = PopupEffect.None)
Parameters
contentViewThe view to display inside the popup.
anchorRectRectThe rect of the triggering element in window coordinates. The platform uses this to position the popup so that (for example) a selected item aligns with the anchor text.
placementPopupPlacementPreferred placement direction.
sizeSize?Desired popup size. If
null, the platform falls back to a default size.effectPopupEffectVisual backdrop effect to apply to the popup window.
Events
Closed
Raised when the popup is dismissed (click-outside, explicit close, or parent window close).
event Action? Closed