Interface IOverlay
A transient in-window overlay acquired via GetService<IOverlay>().
Rendered by RootView on top of all other content — no native window is created.
Works on every platform (Windows, macOS, iOS, Android, Browser) with no platform-specific code.
public interface IOverlay : IDisposable
- Inherited Members
Remarks
Use this for cross-platform scenarios: mobile, simulators, web/SPA, or in-app surfaces like top-of-screen search fields that must stay within the window. For native OS-level popups that can extend outside the app window, use IPopup instead.
Usage pattern:
var overlay = this.GetService<IOverlay>();
overlay.Show(content, anchorRect, PopupPlacement.Below);
The overlay auto-dismisses when the user clicks outside. Disposing the overlay closes it if still visible.
Properties
IsVisible
Whether the overlay is currently visible.
bool IsVisible { get; }
Property Value
Methods
Close()
Closes the overlay if visible.
void Close()
Show(View, Rect, PopupPlacement, Size?, PopupEffect)
Shows the overlay 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 overlay.
anchorRectRectThe rect of the triggering element in window coordinates. Used to position the overlay (for example, below a button).
placementPopupPlacementPreferred placement direction.
sizeSize?Desired overlay size. If
null, a default size is used.effectPopupEffectVisual backdrop effect (reserved for future use).
Events
Closed
Raised when the overlay is dismissed (click-outside, explicit close, or parent window close).
event Action? Closed