embed reference

Escape hatch: mounts an arbitrary engine Panel (a Razor panel, a library control, any imperative panel) inside a Goo tree. Create runs once at mount; Update runs right after creation and again on every owner rebuild - push current data into the panel there. The panel owns its own internal state; Goo only positions and styles the slot and never diffs inside it. Hosted panels default to PointerEvents.All so they receive input under Goo's pointer-transparent containers; declare PointerEvents on the blob (or in the panel's own constructor) to override.

example

var legacy = new Embed
{
    Create = () => new Sandbox.UI.Panel(),
    Update = p => p.Style.Opacity = 0.9f,
    Width = 200, Height = 100,
};

structural properties

property type notes
Update Action? Data-push hook: runs after creation and on every rebuild of the owning GooPanel, unconditionally (delegates cannot be diffed). Keep it a cheap property push and let the panel self-diff.

layout

property type notes
FlexBasis Length? Initial main-axis size of a flex child before grow and shrink are applied.
FlexGrow float? Share of leftover main-axis space this child claims; 0 (default) means do not grow.
FlexShrink float? How readily this child shrinks when space is tight; 0 pins it to its basis.
Position PositionMode? Positioning scheme: Relative offsets from the normal slot, Absolute lifts the box out of flow against the nearest positioned ancestor.

position offsets

property type notes
Bottom Length? Bottom-edge offset; applied only when Position is Relative or Absolute.
Left Length? Left-edge offset; applied only when Position is Relative or Absolute.
Right Length? Right-edge offset; applied only when Position is Relative or Absolute.
Top Length? Top-edge offset; applied only when Position is Relative or Absolute.

sizing

property type notes
Width Length? Width of the box (Length: px, %, em, rem, ...).
Height Length? Height of the box.
MaxHeight Length? Upper bound on height.
MaxWidth Length? Upper bound on width; the box never grows past it.
MinHeight Length? Lower bound on height.
MinWidth Length? Lower bound on width; the box never shrinks below it.

spacing

property type notes
Margin Length? Outer space on all four edges, between this box and its neighbors.
MarginLeft Length? Outer space on the left edge.
MarginTop Length? Outer space on the top edge.
MarginRight Length? Outer space on the right edge.
MarginBottom Length? Outer space on the bottom edge.

background

property type notes
BackgroundColor Color? Fill color behind the content.
BackgroundTint Color? Multiplies the background image color; default white (no tint).

border radius

property type notes
BorderRadius Length? Rounds all four corners.
BorderTopLeftRadius Length? Rounds the top-left corner.
BorderTopRightRadius Length? Rounds the top-right corner.
BorderBottomRightRadius Length? Rounds the bottom-right corner.
BorderBottomLeftRadius Length? Rounds the bottom-left corner.

effects

property type notes
Opacity float? Overall opacity from 0 (transparent) to 1 (opaque).

transform

property type notes
Transform Goo.PanelTransform? Translate, rotate, scale, and skew applied to the rendered box.

misc

property type notes
PointerEvents PointerEvents? Whether the element receives pointer input (All or None).

events and key

property type notes
Create Func? Builds the hosted panel. Runs exactly once, at mount. Swapping this delegate on a later rebuild does NOT recreate the panel; change Key to force a new instance.
Key string? Stable identity across rebuilds. Set it when this blob can change position among its siblings, so the reconciler matches it to the same panel.

see also