Svg.Editor.Core contains the host-agnostic state and orchestration primitives used across the editor stack.
dotnet add package Svg.Editor.Core
| Type | Role |
|---|---|
SvgEditorSession |
Central mutable editor session state |
ISvgEditorSession |
Interface for host abstractions and testing |
SvgEditorSettings |
Wireframe, filter, grid, snap, and hidden-element toggles |
SvgEditorToolKind |
High-level current-tool enum |
SvgNode |
Document-outline tree node |
ArtboardInfo |
Artboard metadata |
ClipboardSnapshot |
Copy/paste payload container |
using Svg.Editor.Core;
const string previousXml = "<svg viewBox=\"0 0 16 16\" />";
var session = new SvgEditorSession
{
WorkspaceTitle = "My SVG Editor",
CurrentTool = SvgEditorToolKind.Select
};
session.SetSelectedElementIds(new[] { "logo", "shadow" });
session.PushUndoState(previousXml);
SvgEditorSession also tracks CurrentFile, Document, Nodes, Artboards, ExpandedNodeIds, PropertyFilterText, and the selected-element id list used by the reusable UI layers.
Svg.Editor.Svg adds SVG-specific mutation services on top of this state.Svg.Editor.Skia adds the interaction and rendering logic.Svg.Editor.Avalonia binds the state into reusable controls.Svg.Editor.Skia.Avalonia exposes the complete workspace.