Class DesktopPortal
- Namespace
- SharpConsoleUI.Core
- Assembly
- SharpConsoleUI.dll
A desktop-level portal that renders above all windows. Portals are lightweight render overlays managed by DesktopPortalService.
public class DesktopPortal
- Inheritance
-
DesktopPortal
- Inherited Members
- Extension Methods
Fields
IsDirty
Thread-safe dirty flag — background threads may trigger Invalidate.
public volatile bool IsDirty
Field Value
Properties
Bounds
Screen-space position and size.
public Rectangle Bounds { get; set; }
Property Value
BufferOrigin
Screen coordinate that buffer position (0,0) maps to. Defaults to Bounds.Location for backwards compatibility. Set to DesktopUpperLeft when the buffer needs to cover space above the portal (e.g., Start Menu).
public Point BufferOrigin { get; }
Property Value
BufferSize
Buffer size for rendering. When larger than Bounds, allows portal children (submenus) to extend beyond the primary content area. Defaults to Bounds size.
public Size BufferSize { get; }
Property Value
ConsumeClickOnDismiss
Whether the dismissing click is consumed or passed through.
public bool ConsumeClickOnDismiss { get; }
Property Value
Content
The root control rendered in this portal.
public IWindowControl Content { get; }
Property Value
DimBackground
Whether to dim the screen behind the portal.
public bool DimBackground { get; }
Property Value
DismissOnClickOutside
Whether clicking outside dismisses this portal.
public bool DismissOnClickOutside { get; }
Property Value
HasRendered
Whether this portal has been rendered at least once (has valid control bounds and buffer).
public bool HasRendered { get; }
Property Value
Id
Unique identifier for this portal.
public string Id { get; }
Property Value
OnDismiss
Callback invoked when the portal is dismissed.
public Action? OnDismiss { get; }
Property Value
Owner
The control that owns this portal.
public IWindowControl? Owner { get; }
Property Value
RootNode
DOM tree root for layout and rendering.
public LayoutNode RootNode { get; }
Property Value
ZOrder
Stacking order among portals (higher = on top).
public int ZOrder { get; }