Skip to content
Version 2.35.0
↓ Get the launcher

LayerStackElement record

Draws layers ON TOP of each other in the same rect (framework 2.33.0) — e.g. a “Loading…” overlay over a chart and table. Base is laid out like any other child and defines the stack’s size; each of the Overlays is stretched over that rect (it never affects layout) and drawn above the base and above every earlier overlay, in order.

Overlays are built once, with the window. Showing or hiding one (Visible, polled at the window refresh rate) only switches it on/off — the base is not rebuilt or re-laid-out.

Input: a visible overlay with BlocksInput swallows clicks, hover, the mouse wheel and drags over its rect — nothing in the layers below it reacts. Without it the overlay is decorative and fully click-through (its own buttons don’t react either). A hidden overlay never blocks anything.

Sizing follows ConditionalElement: in a Column the stack fills the width; in a Row it takes the base’s preferred width (it does not grab leftover row space); leftover height is shared only if the base asks for it.

public record LayerStackElement : IEquatable<HudElement>
name description
LayerStackElement(…) Draws layers ON TOP of each other in the same rect (framework 2.33.0) — e.g. a “Loading…” overlay over a chart and table. Base is laid out like any other child and defines the stack’s size; each of the Overlays is stretched over that rect (it never affects layout) and drawn above the base and above every earlier overlay, in order.
Base { get; set; } Layer 0: the content underneath (laid out normally).
Overlays { get; set; } Layers 1..n, drawn over the base in order (last = top).