百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

SvgToXaml

> 编程语言
开源

智能工具,可查看 svg 文件并将其转换为 xaml 以在 .NET 中使用

1.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

智能工具,可查看 svg 文件并将其转换为 xaml 以在 .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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

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