AsterGraph.Avalonia 0.2.0-alpha.1

This is a prerelease version of AsterGraph.Avalonia.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package AsterGraph.Avalonia --version 0.2.0-alpha.1
                    
NuGet\Install-Package AsterGraph.Avalonia -Version 0.2.0-alpha.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AsterGraph.Avalonia" Version="0.2.0-alpha.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AsterGraph.Avalonia" Version="0.2.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="AsterGraph.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AsterGraph.Avalonia --version 0.2.0-alpha.1
                    
#r "nuget: AsterGraph.Avalonia, 0.2.0-alpha.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AsterGraph.Avalonia@0.2.0-alpha.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AsterGraph.Avalonia&version=0.2.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AsterGraph.Avalonia&version=0.2.0-alpha.1&prerelease
                    
Install as a Cake Tool

AsterGraph.Avalonia

Avalonia UI shell for the AsterGraph editor.

Quick Start: main UI entry quick start.

This package belongs to the supported AsterGraph package set with AsterGraph.Abstractions, AsterGraph.Core, and AsterGraph.Editor, and it targets net8.0 and net9.0.

Direct package reference:

  • Yes, this is the default UI package for hosts embedding the editor.
  • Pair it with AsterGraph.Editor for the canonical hosted-UI composition path.
  • Pair it with AsterGraph.Abstractions for node definitions and shared style contracts.
  • Add AsterGraph.Core when the host also needs direct model or serialization access.

This project intentionally contains:

  • GraphEditorView
  • GraphEditorView.ChromeMode for switching between the default shell and CanvasOnly
  • NodeCanvas as a supported standalone graph surface
  • GraphInspectorView as a supported standalone inspector surface
  • GraphMiniMap as a supported standalone mini map surface
  • GraphContextMenuPresenter as the stock Avalonia menu presenter
  • AsterGraphPresentationOptions plus node/menu/inspector/mini-map presenter contracts for opt-in visual replacement
  • canvas rendering and pointer interaction
  • theme resources
  • context-menu presentation from editor descriptors
  • rendered-control-based anchor resolution for connection endpoints

This project intentionally does not own:

  • node definition contracts
  • compatibility policy
  • editor-state orchestration
  • demo node content

Those responsibilities live in AsterGraph.Abstractions, AsterGraph.Core, and AsterGraph.Editor. AsterGraph.Demo remains a sample app only.

Integration entry points:

Canonical and compatibility UI entry paths:

  • Canonical full shell: AsterGraphAvaloniaViewFactory.Create(new AsterGraphAvaloniaViewOptions { ... })
  • Canonical standalone canvas: AsterGraphCanvasViewFactory.Create(new AsterGraphCanvasViewOptions { ... })
  • Canonical standalone inspector: AsterGraphInspectorViewFactory.Create(new AsterGraphInspectorViewOptions { ... })
  • Canonical standalone mini map: AsterGraphMiniMapViewFactory.Create(new AsterGraphMiniMapViewOptions { ... })
  • Compatibility: new GraphEditorView { Editor = editor }

Per-surface presentation replacement is opt-in through AsterGraphPresentationOptions.

Phase 18 readiness note:

  • future plugin/automation work should anchor on editor.Session / CreateSession(...), not on Avalonia controls themselves
  • src/AsterGraph.Demo, tools/AsterGraph.PackageSmoke, and tools/AsterGraph.ScaleSmoke now carry the current host/UI validation signals for that runtime boundary

Phase 16 adapter boundary:

  • Stock full-shell and standalone-canvas context menus are built from editor.Session.Queries.BuildContextMenuDescriptors(...).
  • IGraphContextMenuPresenter implementations can opt into the canonical descriptor overload and receive IGraphEditorCommands directly. The older MenuItemDescriptor overload remains as a compatibility path.
  • Stock default keyboard shortcuts in GraphEditorView and NodeCanvas now route through a shared Avalonia shortcut adapter over editor.Session.Commands.
  • GraphEditorView owns Avalonia clipboard and host-context seam binding for the full shell. Its embedded NodeCanvas keeps platform-seam ownership disabled.
  • A standalone NodeCanvas owns those Avalonia clipboard and host-context seams when it is attached to the visual tree.

Example full-shell configuration:

var view = AsterGraphAvaloniaViewFactory.Create(new AsterGraphAvaloniaViewOptions
{
    Editor = editor,
    Presentation = new AsterGraphPresentationOptions
    {
        NodeVisualPresenter = customNodePresenter,
        ContextMenuPresenter = customMenuPresenter,
        InspectorPresenter = customInspectorPresenter,
        MiniMapPresenter = customMiniMapPresenter,
    },
});

If Presentation is omitted, the shipped stock presenters remain active.

Standalone canvas keeps the stock context menu and stock command shortcuts enabled by default. Hosts can explicitly opt out through:

  • EnableDefaultContextMenu
  • EnableDefaultCommandShortcuts

If a host replaces only the presenter, not the editor state, the recommended path is to keep consuming canonical session descriptors/commands and treat GraphEditorViewModel.BuildContextMenu(...) as retained compatibility surface.

Header/library/status chrome remain shell-only. Phase 4 adds presenter replacement for node visuals, menus, inspector, and mini map without moving editor behavior into the host.

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.11.0-beta 55 4/26/2026
0.2.0-alpha.3 64 4/18/2026
0.2.0-alpha.2 51 4/18/2026
0.2.0-alpha.1 56 4/17/2026