Overview
Three canvases for the NE.Standard UI framework, over one canvas core — pan and zoom, the grid, selection, groups, reroute points, undo, the menus and the save. Two packages, on the framework's own pattern — the component, which is platform-independent, and its web rendering, which carries the canvas engine and its stylesheet embedded in its assembly — and two of ready-made node kinds, a calculator's and pictures'.
| Component | The viewer... | Its items come from |
|---|---|---|
NodesComponent |
builds a network of typed nodes — values, pins, connections — which the package then runs | your own C# classes, read by their attributes |
LayeredGraphComponent |
reads or edits a graph of nodes and links laid out in layers, its cycles drawn as backward edges | a bound live collection of UIGraphNode, each carrying its links |
ProductionGraphComponent |
reads, edits or plans resources and the recipes between them: how many runs of what reach the amounts asked for | a bound live collection of UIResource and UICraft |
Each is an input whose value is its document, edited in the browser and committed whole by an explicit save. The node canvas, a graph of the application's nodes and a production graph each have a page; what the canvas page says — the grid, the menus, the save — holds for all three.
On the node canvas the node kinds are your own C# classes. You write ordinary types, mark them with attributes, and the canvas builds the catalogue, the picker, the pins, the editors and the wiring from them — and a saved sheet deserializes straight back into instances of those types, so the network you run is typed, not JSON.
Install
dotnet add package NE.Standard.UI.Graph
dotnet add package NE.Standard.UI.Web.Graph
A calculator's kinds come ready made in a third, NE.Standard.UI.Graph.Calculator,
and picture kinds worked with SkiaSharp in a fourth, NE.Standard.UI.Graph.Image.
Each package brings its namespaces as global usings, so the code below needs no using line for them; a project that
sets NEStandardUIImplicitUsings to false writes its own.
Register the web rendering beside the framework's renderers:
services.AddStandardRenderers();
services.AddGraph();
What it does not do
- No sub-graphs, and no collapsing a group into one node.
- Clipboard copy and paste (
Ctrl+CandCtrl+V) belongs to the node canvas alone; the layered and production canvases duplicate in place (Ctrl+D) under a sheet-issued key whenEditStructureis on.