NE.Standard

Add-ons

The add-ons are the framework's own packages, built alongside it and released at its version number, every add-on with every framework release (packages). Each comes in the framework's two halves — the platform-independent package in the application's library, the web rendering in the host — and the host registers the rendering beside the built-in renderers:

// App.Web/AppWebStartup.cs
protected override void ConfigureServices(IServiceCollection services)
{
    services.AddStandardRenderers();
    services.AddCharts();
}

Each add-on ships from a public repository of its own, and its README there is the full reference — every property, the viewer's keys, what it deliberately does not do. This page is the overview that leads to them. Every package brings its namespaces as global usings, as the framework's do, so the samples need no using line.

Icons

Material Symbols: every rounded glyph, filled and outlined, as const string names in the library and the font in the host. The font carries every glyph, but the stylesheet a page receives has rules only for the names the application registers — a gallery whose names arrive in data registers the whole set — and a misspelt name fails at startup rather than drawing nothing. The framework's own glyphs, a dialog's close or a standard action's, can be drawn from the set too (MapUIGlyph). The icon packages are MIT; every other package on this page is under the framework's licence.

dotnet add App package NE.Standard.UI.Icons.Material
dotnet add App.Web package NE.Standard.UI.Web.Icons.Material
services.AddMaterialWebIcons(MaterialIconStyle.Fill | MaterialIconStyle.Outlined, MaterialIcons.Save);
new ButtonComponent()
    .SetIcon(MaterialIcons.Outlined(MaterialIcons.Save))
    .SetTitle("Save changes")
    .OnClick(nameof(Controller.Save));

README · NuGet: NE.Standard.UI.Icons.Material, NE.Standard.UI.Web.Icons.Material

CodeInput

A code editor field: syntax highlighting for JSON, CSS and LESS, JavaScript and TypeScript, HTML, Bash, C#, Python and Markdown, line numbers, several carets, completions, and find and replace that runs in the browser, over a status bar of the caret's place, the tab size, the encoding, the line ending and the language. It is the framework's field — value, validation, header and read-only state work as a text area's do — and Ctrl+S commits it and raises its own code-save event. Beside it, MarkdownDisplayComponent shows a Markdown document as formatted text.

dotnet add App package NE.Standard.UI.CodeInput
dotnet add App.Web package NE.Standard.UI.Web.CodeInput
services.AddCodeInput();
new CodeInputComponent()
    .SetTitle("appsettings.json")
    .SetLanguage(UICodeLanguages.Json)
    .SetRows(20)
    .BindValue(nameof(SettingsController.Json))

README · NuGet: NE.Standard.UI.CodeInput, NE.Standard.UI.Web.CodeInput

DataGrid

The framework's table with what the table leaves to an add-on. DataGridComponent derives from TableComponent, so its rows, its window over a source, its selection and its chrome are the table's own; the grid adds sorting by header, typed columns formatted in the page's culture, editing in place, filters and a search box, paging, a footer of totals, pinned and responsive columns with a chooser, a detail row and CSV export. It is not a spreadsheet: no cell ranges, no formulas, and every commit is one event.

dotnet add App package NE.Standard.UI.DataGrid
dotnet add App.Web package NE.Standard.UI.Web.DataGrid
services.AddDataGrid();
new DataGridComponent()
    .SetItems(orders)
    .AddTextColumn("Order", nameof(Order.Number), UIGridUnit.Absolute(120))
    .AddEnumColumn<OrderStatus>("Status", nameof(Order.Status))
    .AddNumberColumn("Quantity", nameof(Order.Quantity), "N0")
    .AddMoneyColumn("Total", nameof(Order.Total), "€")
    .AddDateColumn("Ordered", nameof(Order.Ordered), "dd MMM yyyy")
    .AddBooleanColumn("Paid", nameof(Order.Paid))

README · NuGet: NE.Standard.UI.DataGrid, NE.Standard.UI.Web.DataGrid

Charts

Line, area, bar, pie, share bar, scatter, radar, sparkline and gauge, as SVG the server writes and the browser keeps, over keyed collections: a reading that arrives reaches the browser as one value, and the chart is drawn again there. The share bar lays one series' parts along a single thin bar against a total — a drive's storage, a budget, a context window — and a pie's or a share bar's legend can be a table of each part's value and share. The viewer hovers a point or a whole x, puts a series aside at the legend, presses a point to reach a command, and zooms and pans along the x axis where the author allows it.

dotnet add App package NE.Standard.UI.Charts
dotnet add App.Web package NE.Standard.UI.Web.Charts
services.AddCharts();
new LineChartComponent()
    .BindItems(nameof(Controller.Samples))
    .SetX(nameof(Sample.Time))
    .SetXAxis(UIChartAxis.Time("Time", format: "HH:mm"))
    .SetYAxis(UIChartAxis.Linear("Percent", min: 0, max: 100, format: "N0"))
    .AddSeries("cpu", "CPU", nameof(Sample.Cpu))
    .AddSeries("memory", "Memory", nameof(Sample.Memory))
    .SetSmooth(true)

README · NuGet: NE.Standard.UI.Charts, NE.Standard.UI.Web.Charts

Graph

Three canvases over one canvas core — pan and zoom, the grid, selection, groups, undo, the menus and the save. NodesComponent is a network of typed nodes the viewer builds and the package runs, whose node kinds are the application's own C# classes marked with attributes, so a saved sheet reads back as instances of them; LayeredGraphComponent lays a graph of the application's nodes and links out in layers; ProductionGraphComponent holds resources and the recipes between them, and plans how many runs of what reach the amounts asked for. Each is an input whose value is its document, committed whole by a save. Graph has a documentation site of its own.

dotnet add App package NE.Standard.UI.Graph
dotnet add App.Web package NE.Standard.UI.Web.Graph
services.AddGraph();
new NodesComponent(Controller.CanvasId)
    .SetCatalog(typeof(OperationNode), typeof(NumberNode), typeof(ResultNode))
    .SetCanvasHeight(34)
    .BindValue(nameof(Controller.Sheet))
    .OnSave(nameof(Controller.Save));

NumberNode is one of the common kinds every catalogue may take; OperationNode and ResultNode are the calculator's, below.

Documentation · README · NuGet: NE.Standard.UI.Graph, NE.Standard.UI.Web.Graph

Graph.Calculator

A calculator's node kinds for the node canvas — an operation, rounding, a sum, a clamp, the least or the most of several, a comparison and a result — beside the application's own. It is one package, in the library: the kinds wear the framework's glyphs, so the host registers nothing for them.

dotnet add App package NE.Standard.UI.Graph.Calculator
public static UINodeCatalog Catalog { get; } = UINodeCatalog.FromTypes([.. UINodeKinds.Common, .. CalculatorNodes.Kinds, typeof(MyNode)]);

Documentation · NuGet: NE.Standard.UI.Graph.Calculator

Graph.Image

Picture node kinds worked on the server with SkiaSharp — size, resize, crop, rotate, flip, greyscale, blur and convert — over an image store the application chooses. It is one package, in the library, and the application registers the store in its own startup: AddGraphImages() keeps pictures in memory, and an application with a store of its own implements IUINodeImageStore instead.

dotnet add App package NE.Standard.UI.Graph.Image
public static UINodeCatalog Catalog { get; } = UINodeCatalog.FromTypes([.. UINodeKinds.Common, .. ImageNodes.Kinds]);

// AppStartup.ConfigureServices
services.AddGraphImages();

Documentation · NuGet: NE.Standard.UI.Graph.Image