#razor
14 items (14 fixes)
@ref on a private field compiles with only a CS0649 warning — the ref stays null at runtime. Bind to a property instead.
global using Sandbox + your razor namespace in Assembly.cs — without it, panels and game types don't resolve across the assembly.
No native drag helper exists for PanelComponent sliders — use the engine's SliderControl pattern: MousePanelEvent.LocalPosition over track width, with pointer-events routing.
One ScreenPanel host, static UIState for modals, self-closing panels, toast stack — BuildHash every flag the markup reads.
Razor HUD emoji and dashes die under Get-Content/Set-Content — edit with byte-safe UTF-8 APIs or a real editor.
dotnet build reports 0 errors on .razor files the in-editor compiler rejects — the headless build doesn't surface the Razor errors the live editor's Roslyn compiler flags.
BuildHash() is the only re-render trigger — hash everything the markup reads, including collection contents and flags.
A newly created .razor.scss file is not picked up by a running editor session — the panel component works but is unstyled until the next restart.
OnAfterTreeRender(bool) is a Panel hook — on a PanelComponent it fails with CS0115; use parameterless OnTreeBuilt() or OnTreeFirstBuilt().
SCSS background-image only resolves asset paths — runtime Texture objects must be assigned via Panel.Style.BackgroundImage in OnTreeBuilt.
Use TextEntry with onsubmit and OnTextEdited — standard Blazor input bindings compile but are not how the engine UI works.
An untyped or expression-bodied lambda on TextEntry.OnTextEdited fails with CS8917 or CS0029 — use an explicit param type plus a block body.
Razor classes get a RootNamespace/folder-derived namespace — declare @namespace and global using or C# can't find your panels.
Literal spaces adjacent to a tag or @-expression boundary vanish in Razor markup — use a single interpolated string or CSS margin instead.