Svg.Editor.Skia.Avalonia is the highest-level editor package. It exposes the interactive surface and the ready-made workspace extracted from AvalonDraw.
dotnet add package Svg.Editor.Skia.Avalonia
samples/AvalonDraw now hosts,| Type | Role |
|---|---|
SvgEditorWorkspace |
Full editor composition including menu, tool palette, panels, surface, and status bar |
SvgEditorSurface |
Skia-backed SVG surface with public InteractionController and OverlayRenderer hooks |
<editor:SvgEditorWorkspace x:Name="EditorWorkspace" />
EditorWorkspace.WorkspaceTitlePrefix = "MyApp";
EditorWorkspace.ResourceAssembly = typeof(MainWindow).Assembly;
EditorWorkspace.DialogService = new SvgEditorDialogService();
EditorWorkspace.FileDialogService = new SvgEditorFileDialogService();
EditorWorkspace.LoadDocument("Assets/__tiger.svg");
| Member | Use it for |
|---|---|
Session |
Session state, history, nodes, artboards, selected ids, and settings |
Surface |
Direct control access for the Skia-backed canvas |
WorkspaceTitlePrefix |
App branding |
ResourceAssembly |
Embedded asset lookup |
DialogService |
Custom modal or inline editor hosting |
FileDialogService |
Custom storage or picker integration |
PreviewRequested |
Preview window or preview pane integration |
WorkspaceTitleChanged |
Sync host window titles |
SvgEditorSurface inherits from Avalonia.Svg.Skia.Svg and adds:
InteractionControllerOverlayRendererUse those when the host wants the reusable canvas but plans to wire the surrounding UI itself.