Nodely.Core
0.6.0
dotnet add package Nodely.Core --version 0.6.0
NuGet\Install-Package Nodely.Core -Version 0.6.0
<PackageReference Include="Nodely.Core" Version="0.6.0" />
<PackageVersion Include="Nodely.Core" Version="0.6.0" />
<PackageReference Include="Nodely.Core" />
paket add Nodely.Core --version 0.6.0
#r "nuget: Nodely.Core, 0.6.0"
#:package Nodely.Core@0.6.0
#addin nuget:?package=Nodely.Core&version=0.6.0
#tool nuget:?package=Nodely.Core&version=0.6.0
Nodely
Nodely is a native Avalonia toolkit for building interactive node / graph / diagram editors — a first-party port of the proven Blazor.Diagrams architecture to Avalonia. Pan/zoom canvas, custom nodes, interactive links, groups, an overview minimap, theming, read-only mode, serialization, undo/redo, and auto-layout — with no SVG, no JS, no WebView, just Avalonia's native rendering.
Status: v0.6.0. Engine + Avalonia UI are complete and tested on
net8.0andnet10.0(150 tests per runtime across the headless engine and Avalonia headless UI). SeeCHANGELOG.mdand the design notes inmemory/.
Why
- Performance first — virtualized nodes, cached link geometry, immediate-mode grid/overview. A 2000-node / ~4000-link graph re-routes + generates all paths in ~15 ms.
- Customizable — define a custom node by subclassing
NodeModeland registering an Avalonia control. - Clean architecture — a UI-agnostic engine (
Nodely.Core) + a thin Avalonia rendering/input layer. - MVVM-agnostic — works with CommunityToolkit.Mvvm, ReactiveUI, or plain objects.
Packages
Install the main Avalonia package:
dotnet add package Nodely.Avalonia
Optional packages:
dotnet add package Nodely.Algorithms
dotnet add package Nodely.Serialization
Use Nodely.Core directly for headless engine scenarios; it is included transitively by Nodely.Avalonia.
| Package | Targets | What |
|---|---|---|
Nodely.Core |
netstandard2.0, net8.0, net10.0 |
UI-agnostic engine: models, behaviors, geometry, routers, path generators, commands. |
Nodely.Avalonia |
net8.0, net10.0 |
Avalonia controls: DiagramCanvas, DiagramNavigator, theming, adorners. |
Nodely.Algorithms |
netstandard2.0, net8.0, net10.0 |
Optional: traversal, connected components, layered auto-layout. |
Nodely.Serialization |
netstandard2.0, net8.0, net10.0 |
Optional: versioned JSON snapshots. |
Getting started
using Nodely;
using Nodely.Avalonia.Controls;
using Nodely.Models;
using Point = Nodely.Geometry.Point;
var diagram = new NodelyDiagram();
var a = diagram.Nodes.Add(new NodeModel(new Point(80, 80)) { Title = "Start" });
var b = diagram.Nodes.Add(new NodeModel(new Point(360, 80)) { Title = "End" });
diagram.Links.Add(new LinkModel(a.AddPort(PortAlignment.Right), b.AddPort(PortAlignment.Left)));
var canvas = new DiagramCanvas { Diagram = diagram }; // drop into any Avalonia layout
Drag empty space to pan, scroll to zoom, drag a node to move, drag from a port to another to connect, Shift-drag to marquee-select, Delete to remove, Esc to clear selection.
Customizing nodes (the headline)
public sealed class TaskNode : NodeModel
{
public TaskNode(Point p, string title) : base(p) => Title = title;
public string Status { get; set; } = "Pending";
}
canvas.RegisterNode<TaskNode>(node => new Border
{
Background = new SolidColorBrush(Color.FromRgb(0x2D, 0x4A, 0x6B)),
Padding = new Thickness(14, 10),
Child = new TextBlock { Text = $"{node.Title} — {node.Status}", Foreground = Brushes.White },
});
diagram.Nodes.Add(new TaskNode(new Point(120, 200), "Build") { Status = "Running" });
Custom links are composed: set a per-link Router / PathGenerator, or change the defaults via
diagram.Options.Links. Custom ports/anchors/behaviors are registered explicitly (no reflection scanning).
More features
// Theming
canvas.Palette = NodelyPalettes.Light; // or NodelyPalettes.Dark (default)
// Read-only inspector (pan/zoom/select work; move/connect/delete blocked)
canvas.IsReadOnly = true;
// View controls
canvas.ZoomToFit(); canvas.ZoomIn(); canvas.ResetView();
// Overview minimap (bind to the same diagram, place anywhere)
var navigator = new DiagramNavigator { Diagram = diagram };
// Snap-to-grid
diagram.Options.GridSize = 24;
// Grouping
diagram.Options.Groups.Enabled = true;
diagram.Groups.Group(a, b);
// Auto-layout (Nodely.Algorithms)
Nodely.Algorithms.LayeredLayout.Arrange(diagram);
// Serialization (Nodely.Serialization)
string json = Nodely.Serialization.DiagramSerializer.Serialize(diagram);
Nodely.Serialization.DiagramSerializer.Deserialize(new NodelyDiagram(), json);
// Undo/redo (Nodely.Commands)
var history = new Nodely.Commands.UndoRedoStack();
history.Execute(new Nodely.Commands.AddNodeCommand(diagram, new NodeModel()));
history.Undo(); history.Redo();
// Toolbar state
canvas.CommandStateChanged += RefreshToolbar;
copyButton.IsEnabled = canvas.CanCopySelection;
pasteButton.IsEnabled = canvas.CanPasteClipboard;
groupButton.IsEnabled = canvas.CanGroupSelection;
Repository layout
src/ Nodely.Core, Nodely.Avalonia, Nodely.Algorithms, Nodely.Serialization
samples/ Nodely.Demo (Avalonia desktop gallery), Nodely.QuickStart (minimal copyable app)
tests/ Nodely.Core.Tests (xUnit), Nodely.Avalonia.Tests (Avalonia headless)
bench/ Nodely.Benchmarks (engine throughput)
memory/ Design decisions (ADRs), research, the development plan, progress, learnings
Build & run
Building the repository requires the .NET 10 SDK (pinned via global.json). Packages ship assets for
both net8.0 and net10.0 Avalonia consumers; samples/Nodely.QuickStart targets net8.0.
dotnet build Nodely.slnx
dotnet test Nodely.slnx
dotnet run --project samples/Nodely.Demo
dotnet run --project samples/Nodely.QuickStart
dotnet pack Nodely.slnx -c Release # produces the NuGet packages
License
MIT — see LICENSE and THIRD-PARTY-NOTICES.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Nodely.Core:
| Package | Downloads |
|---|---|
|
Nodely.Avalonia
Avalonia controls for Nodely: the DiagramCanvas surface, node/port/link rendering, widgets, and theme. |
|
|
Nodely.Algorithms
Optional graph algorithms and auto-layout for Nodely. (Built out in Phase 12.) |
|
|
Nodely.Serialization
Optional versioned JSON snapshot serialization for Nodely diagrams. |
GitHub repositories
This package is not used by any popular GitHub repositories.