LANCommander.Server.UI
2.0.0-alpha
dotnet add package LANCommander.Server.UI --version 2.0.0-alpha
NuGet\Install-Package LANCommander.Server.UI -Version 2.0.0-alpha
<PackageReference Include="LANCommander.Server.UI" Version="2.0.0-alpha" />
<PackageVersion Include="LANCommander.Server.UI" Version="2.0.0-alpha" />
<PackageReference Include="LANCommander.Server.UI" />
paket add LANCommander.Server.UI --version 2.0.0-alpha
#r "nuget: LANCommander.Server.UI, 2.0.0-alpha"
#:package LANCommander.Server.UI@2.0.0-alpha
#addin nuget:?package=LANCommander.Server.UI&version=2.0.0-alpha&prerelease
#tool nuget:?package=LANCommander.Server.UI&version=2.0.0-alpha&prerelease
LANCommander.Server.UI
The server's component library. Pages and components in LANCommander.Server use the Controls
in this project and never Radzen directly. Radzen is an implementation detail: it is referenced with
PrivateAssets="compile", so @using Radzen does not even compile in the server, and
RadzenBoundaryTests catches anything that slips past that.
Namespaces
| Namespace | Contents | Imported by |
|---|---|---|
LANCommander.Server.UI.Controls |
Radzen-backed and custom controls (Button, Flex, Alert, ...) |
Migrated server folders |
LANCommander.Server.UI.Services |
NotificationService, DialogService, AlertService, UploadTracker |
Migrated server folders |
LANCommander.Server.UI.Components |
Framework-independent components (MouseArea, ByteSize, CodeInput, ...) |
Everywhere |
LANCommander.Server.UI.Legacy |
AntDesign-based components awaiting replacement | Unmigrated server folders only |
While the migration is in progress, each server folder's _Imports.razor imports either the legacy
set (AntDesign + Legacy) or the new set (Controls), never both: many control names match
AntDesign's and Razor rejects ambiguous tags.
Writing a control
- One folder per control or family under
Controls/, with@namespace LANCommander.Server.UI.Controls. - Inherit
ControlBaseforClass,Styleand capturedAdditionalAttributes, and apply them to the outermost element. Build classes and styles withClassBuilder/StyleBuilder. - Style modifiers are bools, written as bare attributes:
<Button Primary Small>,<Tag Success>,<Alert Warning>. When several conflict, document the precedence (seeButton,StatusResolver). - Status colours are always
Primary,Success,Info,Warning,Danger. - Enums for values that are mapped or switched on:
IconType,Gap,Align,Justify,Placement,DialogSize. - Binding uses
Value/ValueChanged(Values/ValuesChangedfor collections). - Text or rich content: a
stringparameter plus a...TemplateRenderFragmentthat replaces it (Title/TitleTemplate,Description/DescriptionTemplate). - Our CSS classes use the
lc-prefix. Theme through--rz-*/--lc-*variables inStyles/_theme.scss; don't restyle Radzen classes elsewhere. - Styles go in
<Control>.razor.scss(or a shared<Family>.scss), forwarded from_Imports.razor.scss. TypeScript goes in<Name>.ts, exported from_Imports.razor.tsand loaded throughScriptProvider. - Don't name a control after an HTML void element (
col,input,link,source,img, ...): Razor parses those tags as void elements, so the control can't take child content. Likewise avoidText: inside@if { }blocks Razor reads<text>as its own markup tag (henceTypography). - Keep Radzen types out of public signatures; consumers can't compile against them.
Every control needs:
- bUnit tests in
LANCommander.Server.UI.Tests/Controls. - At least one fixture in
LANCommander.Server.UI.Fixtures/Components/Setslisting it inCovers(FixtureCatalogTestsfails otherwise). Fixtures render at/_fixturesin Debug builds. - A visual baseline, generated on Linux CI by the Server UI Tests — Update Visual Baselines workflow.
Services
@inject NotificationService Notifications
@inject DialogService Dialogs
@inject AlertService Alerts
Notifications.Success("Game saved");
Notifications.Error(ex, "Could not save game"); // logs, and shows ex.Message as the detail
if (await Alerts.ConfirmAsync("Delete Arena Blitz?", danger: true)) { ... }
var result = await Dialogs.OpenAsync<AddToCollectionDialog, AddToCollectionOptions, IEnumerable<Collection>>(
"Add to Collection", options, new DialogSettings { OkText = "Add" });
Dialogs inherit Dialog<TOptions, TResult>, override OnOkAsync to set Result (return false to
stay open), and get the OK/Cancel footer, busy state and in-dialog error display from the frame.
Loading and errors
PageContent Loading/Spin/Button Loadingfor work in progress.AsyncContent<T>loads data and renders loading, error-with-retry, empty and loaded states.ErrorHandlercatches render and event exceptions;Inlinefor a section, full-page otherwise.PageContentalready wraps its content in an inline handler.
Icons
<Icon Type="IconType.Trash" /> draws a Phosphor icon inline, sized and coloured like the text around
it; Bold, Fill and DuoTone pick the weight. Regenerate the data with
python Controls/Icon/generate-icons.py.
| AntDesign | IconType |
|---|---|
| Close | X |
| Edit | PencilSimple |
| Delete | Trash |
| Upload | UploadSimple |
| Download | DownloadSimple |
| Search | MagnifyingGlass |
| Plus | Plus |
| Folder / FolderOpen | Folder / FolderOpen |
| Ellipsis | DotsThree |
| Check | Check |
| Question / QuestionCircle | Question |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BlazorMonaco (>= 3.4.0)
- BootstrapBlazor.PdfReader (>= 9.0.1)
- ByteSize (>= 2.1.2)
- EasyMDE.Blazor (>= 1.0.5)
- LANCommander.SDK (>= 2.0.0-alpha)
- PSC.Blazor.Components.MarkdownEditor (>= 8.0.8)
- Radzen.Blazor (>= 11.5.0)
- XtermBlazor (>= 2.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-alpha | 36 | 10/15/2026 |