Svg.Editor.Avalonia provides reusable editor UI for Avalonia without requiring the default workspace layout.
dotnet add package Svg.Editor.Avalonia
| Control | Role |
|---|---|
DocumentOutlineView |
Outline tree and artboard list |
ResourceBrowserView |
Layers, patterns, swatches, brushes, symbols, and styles |
PropertyInspectorView |
Filterable property grid and specialized property editors |
ToolPaletteView |
Tool buttons and stroke-width input |
StatusBarView |
Status text and reset button |
| Type | Role |
|---|---|
ISvgEditorDialogService |
Abstracts insert-element, gradient, mesh, stroke, text, swatch, symbol, path, and settings editors |
ISvgEditorFileDialogService |
Abstracts open/save/export/image-pick workflows |
SvgEditorDialogService |
Default window-based dialog implementation |
SvgEditorFileDialogService |
Default Avalonia storage-provider implementation |
The package exposes reusable views for each advanced editing workflow:
InsertElementPickerViewPatternEditorViewGradientStopsEditorViewGradientMeshEditorViewStrokeProfileEditorViewTextEditorViewPathSegmentsEditorViewSwatchEditorViewSymbolPickerViewSymbolNameEditorViewSettingsEditorViewEach view maps to a strongly typed result model under Svg.Editor.Avalonia.Models.
<controls:PropertyInspectorView FilteredProperties="{Binding FilteredProperties}" />
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using Svg.Editor.Avalonia.Controls;
using Svg.Editor.Svg.Models;
var inspector = new PropertyInspectorView
{
FilteredProperties = new ObservableCollection<PropertyEntry>()
};
inspector.PatternReferenceProvider = Array.Empty<string>;
inspector.EditGradientStopsAsync = entry => Task.FromResult<IReadOnlyList<GradientStopInfo>?>(entry.Stops);
inspector.EditGradientMeshAsync = _ => Task.CompletedTask;
inspector.EditStrokeProfileAsync = entry => Task.FromResult<IReadOnlyList<StrokePointInfo>?>(entry.Points);
Use those hooks when the host wants the reusable grid but needs to own the actual advanced editor presentation.