Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

SvgToXaml

> 编程语言
Open source

Smart Tool to view svg-files and convert them to xaml for use in .NET

1.1K stars0 likes0 views
WebsiteGitHub

About

Smart Tool to view svg-files and convert them to xaml for use in .NET

SvgToXaml

Smart tool to view svg-files and convert them to xaml for use in .NET There are 3 major use cases: View many svg-files, examine single files closer (see additional Info, svg sources, xaml code) Convert svg-file to xaml Batch conversion of many svg-files

View

Just start SvgToXaml and drag a folder into the view, this folder will open and you'll see a list of all the svgs located in that folder. Sure there is a button to open also a "open folder" dialog. Double click a icon see the detail view.

Just drag a file into the view and the detail view will open.

Convert

You can open the detail view by double-clicking an icon. Here you can inspect the icon closer and can also see the converted xaml-code.

Batch conversion

The idea is that you collect some svgs and want to use them in your .net app. So just put them in a folder and use SvgToXaml to batch convert them into one xaml-file. The SvgToXaml exe file is designed as a "hybrid" app. Just call it without params and it will start as a WPF app, when you specify params, it will change to a console app. Provide "/?" to see the help, there is only one command rigth now: "BuildDict"

>SvgToXaml.exe /? BuildDict
SvgToXaml - Tool to convert SVGs to a Dictionary
(c) 2015 Bernd Klaiber
   BuildDict  Creates a ResourceDictionary with the svg-Images of a folder
              Needed Arguments:
                /inputdir: specify folder of the graphic files to process
                /outputname: Name for the xaml outputfile
              Optional Params:
                /outputdir: folder for the xaml-Output, optional, default: folder of svgs
                /buildhtmlfile: Builds a htmlfile to browse the svgs, optional,default true

Example: ..\..\SvgToXaml\bin\Debug\SvgToXaml.exe BuildDict /inputdir:.\svg /outputname:images /outputdir:. This is the content of the cmd file included in the sample app. It will produce a xaml file named "images.xaml" in the current folder, including all svg-files from folder ".\svg". That's it, after that, include the file "images.xaml" into your app, merge it into resourcedictionaries in the app.xaml and you can use the icons in e.g. a button like this:


    

after adding more new icons, just run the command again and the new icons will appear in the updated xaml-file. For each Icon the colors, paths, a drawingimage are created (with resource-keys) so you can use them as you like. You can change the color of all icons at once (like theming your app) or you can change all the color of the icons separately (see the sample app included in the sources).

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言