Library / SDK
ElinamLLC/SharpVectors avatar
ElinamLLC/SharpVectors

SharpVectors reads SVG inside WPF without a browser

SharpVectors - SVG# Reloaded: SVG DOM and Rendering in C# for the .Net.

812 stars146 forksC#BSD-3-Clause

At a glance

What is it?
SharpVectors is a C# library that parses SVG into a DOM, converts it to XAML and renders it in WPF and Windows Forms applications. It targets the geometry and drawing level of the SVG specification rather than the whole format, and the packaging split between a WPF-only package and a full GDI+ package is the first decision an adopter has to make.
Who is it for?
Adopt SharpVectors when you are building a Windows desktop application on WPF or WinForms and need to display SVG artwork that arrives at runtime, and pick the SharpVectors.Wpf package if your renderer is WPF only. Skip it if your SVG assets rely on scripting, filters or animation, because the library documents that only geometry and drawing level elements are exported.
Can I use it commercially?
Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 39 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

SVG arrives as a DOM, then XAML, then pixels

SharpVectors solves a specific gap in the Windows desktop world. Browsers handle SVG natively, but a WPF application has no built-in SVG support, and the project's own description says that for .NET developers there was no library complete enough to handle SVG files, with commercial tools either unavailable or incomplete for WPF use.

The pipeline behind the library is three stages. It parses SVG files into an SVG DOM, converts that DOM into XAML, and renders the result. The stated features list adds an optimized XAML output, a small runtime library for handling font URIs and embedded images when the XAML files are used directly from disk, a basic SVG viewer, and interaction with the conversion process through a visitor pattern so an application can supply its own hyperlink handling or font substitutions.

The visitor pattern point is the one that matters most for production use. It is the documented route for custom behaviour during conversion rather than a patch afterwards, which is what makes features such as font substitution feasible in an enterprise document pipeline.

Only geometry and drawing level elements are exported

This is the constraint that decides whether SharpVectors can handle your files. The documentation states, in a note attached to the feature list, that only geometry and drawing level elements are exported, and it warns that this will not work with Silverlight.

The project also sets expectations plainly about scope. It does not aim to provide a complete implementation of the SVG file format, and says it will support the features required in an average graphics application. That is a narrower promise than a browser makes, and it is the right framing for a desktop rendering library.

The practical consequence is that an SVG with embedded scripting, animated content or heavy filter use will not render as it does in a browser, and the documentation does not describe how partial support is signalled at runtime. Anyone feeding this library arbitrary artwork from the open web should check the subset first.

The other limitation is the viewer itself. The feature list describes a simple and basic SVG viewer, and states that an advanced viewer is planned. So the bundled viewing tool is a development aid rather than an end-user viewer.

Two NuGet packages, and a name that is on the way out

The library ships for a wide range of targets. The documented target frameworks are:

yaml
.NET Framework, Version 4.0
.NET Framework, Version 4.5
.NET Framework, Version 4.6
.NET Framework, Version 4.7
.NET Framework, Version 4.8
.NET Standard, Version 2.1
.NET 6.0, .NET 8.0 - 10.0

The library can be used in both WPF and Windows Forms applications. The package list gives three choices on NuGet: SharpVectors.Wpf for WPF only, SharpVectors for the full WPF and GDI+ package, and SharpVectors.Reloaded, which the documentation says is the same as the SharpVectors package. SharpVectors.Reloaded is the one the README recommends when you need the full package.

The reason for the odd naming is historical. The README explains that the SharpVectors.Reloaded name was used when the SharpVectors package name was not available on NuGet. It then states that the SharpVectors.Reloaded name will be retired in version 2.0.

So the packaging advice has two parts. Use SharpVectors.Wpf if your application is WPF only, and if you need the GDI+ renderer as well, take SharpVectors rather than SharpVectors.Reloaded, since the latter name disappears in the next major version. The README also points to a roadmap issue for other renderer packages such as SharpVectors.Gdi for GDI+, which are described as coming as the renderers mature.

The W3C test suite applications are how the project argues about completeness

SharpVectors is developed against the W3C SVG test suite, and it ships applications that make the results readable. The WPF W3C Test Suite application has two panes, with the generated WPF output on top and the W3C expected output image below. The GDI+ variant does the same for the GDI+ renderer. The README draws a conclusion from those results, calling the output the most complete SVG reader for WPF.

That claim is the project's own, and the useful part for an adopter is the mechanism rather than the claim. The suite results are rendered as an image, so a developer can compare the actual WPF output against the reference pixel by pixel, which is how rendering differences such as text positioning get spotted. The repository keeps the suite files in a separate SvgTestSuites repository.

Other samples cover the ordinary cases. The WPF test application browses a directory of SVG files recursively, and there are separate sample boxes for quick tests, other SVG files, thread safety, and XXE handling, plus reference SVG files for text positioning and text rotation. Tutorial samples live in their own TutorialSamples folder.

Two related repositories extend the library: SvgXaml, a SharpVectors based SVG to XAML converter application, and SvgViewer, a SharpVectors based SVG viewer application.

Where SharpVectors sits against other .NET SVG options

The documentation lists two related SVG viewer projects for .NET platforms, vvvv/SVG for GDI+ and SVGImage for WPF, and that is the closest thing to a comparison in the project.

The difference in approach is visible from what SharpVectors itself does. SharpVectors is not only a viewer. It builds an SVG DOM, converts that DOM to XAML with an optimized output, and offers a runtime library for the font and embedded image resources that XAML files need when they are loaded straight from disk. The visitor pattern lets an application step into the conversion, which is where custom hyperlink targets and font substitution are plugged in.

A viewer library answers the question of how to display a file. SharpVectors answers a wider set of questions about how an SVG becomes native WPF objects in your process, and lets you intervene while that happens. If your requirement is display only, a narrower viewer is less machinery to carry. If you need to substitute fonts, rewrite links or post-process the converted tree, the DOM plus XAML route with a visitor hook is the reason to choose SharpVectors.

Release history shows a long gap and a recent bump

The repository is not archived, and the last push was on 2026-09-14, so work on it is current. The release record, though, is irregular. Version 1.8.6 was published on 2026-09-08, version 1.8.5 came out on 2025-08-13, and version 1.8.4 dates from 2024-02-14.

Read plainly, that is a project with long quiet stretches followed by a refresh. The gap between 1.8.4 and 1.8.5 was about a year and a half, and the gap before 1.8.6 was about a year. The current version in the NuGet listings matches 1.8.6.

The repository layout suggests the project is still being worked on rather than archived in place. The solution files cover Visual Studio 2017, 2019 and 2022, alongside a plain.sln and a.slnx variant, along with GitVersion.yml for version numbering, a global.json for SDK pinning, an appveyor.yml for builds, and separate Source, Tests, Libraries, Samples, Docs and Nuget directories. A release notes file sits at the root.

The licence is BSD-3-Clause, with the text in both License.md and License.txt. That is a permissive licence requiring only that the copyright notice and the disclaimer travel with redistributed copies.

Editorial conclusion

Adopt SharpVectors when you are building a Windows desktop application on WPF or WinForms and need to display SVG artwork that arrives at runtime, and pick the SharpVectors.Wpf package if your renderer is WPF only. Skip it if your SVG assets rely on scripting, filters or animation, because the library documents that only geometry and drawing level elements are exported. Verify first that your artwork stays inside that subset, and note that the SharpVectors.Reloaded package name is scheduled for retirement in version 2.0, so bind your project to the SharpVectors package name now.

Frequently asked questions

Which NuGet package should I install for SharpVectors?

The documentation recommends SharpVectors.Wpf for WPF only applications, and SharpVectors as the recommended full WPF and GDI+ package, though it notes that SharpVectors.Reloaded is the same as the SharpVectors package and that the Reloaded name will be retired in version 2.0.

Does SharpVectors support the full SVG specification?

No. The project states that it does not aim to provide a complete implementation of the SVG file format and that only geometry and drawing level elements are exported, which also means the output does not work with Silverlight.

Which .NET versions does SharpVectors target?

The documented targets are .NET Framework 4.0, 4.5, 4.6, 4.7 and 4.8, .NET Standard 2.1, and .NET 6.0 through .NET 8.0 to 10.0. The library can be used in WPF and Windows Forms applications.

Official sources

  1. ElinamLLC/SharpVectors on GitHub
  2. License: BSD-3-Clause
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/elinamllc-sharpvectors.svg)](https://hysenlabs.com/projects/elinamllc-sharpvectors)

Was this useful?