ViewerSvg - svg to xaml converter
Svg is one of the most commonly used file format for storing 2D vector images. Almost
all vector drawing programs can save its drawings into svg file - for example: Adobe®
Inkscape, Microsoft Visio, etc.
This means that designers can use their favorite design tool to create vector graphics
for WPF or Silverlight applications. Also static diagrams that were created in Microsoft
Visio or some other application can be simply turned into dynamic diagrams in WPF
With ViewerSvg the created svg files can be converted into XAML. Because the names
of the objects and all their properties are preserved, the application developers
have full control to manipulate the drawing. It is possible to add mouse events,
change colors, animate the elements and do all other changes that WPF, Silverlight, Windows Phone and Windows Store apps
The elements in svg file can be converted into shapes or geometry objects (WPF only).
The shapes (Canvas, Ellipse, Path, etc.) are great because they can be simply modified
and mouse events can be assigned to them. Geometry objects (GeometryDrawing, PathGeometry,
etc.) are a lightweight version of shapes that have much better performance and
lower memory usage but are harder to manipulate. Therefore graphics objects are
ideal for complex drawings. And what is more the read geometry can be further optimized
for even better performance.
ViewerSvg is using the Ab2d.ReaderSvg
library that imports objects from svg and svgz files at runtime. With the library
it is possible to use svg files just as jpg, png or other files. Ab2d.ReaderSvg
also has many advanced options and other possibilities that are not possible when
using a converted xaml file.
- Convert svg and svgz files into xaml for WPF, Silverlight, Windows Phone and Windows Store apps.
- Read element names from id attribute or title element.
- Read advanced svg elements such as patterns, markers and gradients.
- Rename imported objects.
- Export embedded images into image files.
- Convert objects into Shapes or Geometry objects.
- Additional optimization of Geometry objects.
- Convert texts into PathGeometry
- Batch conversion of multiple files.
- Auto size of svg file content.
- Resize read canvas.
- Export selected elements as bitmap image.
- Control the size of XAML with specifying number of decimals.
- Export custom properties into xml serialized DataTable.
Related Blog posts
|ViewerSvg user interface:
|Creating svg file with data in Microsoft Visio and opening it in ViewerSvg and in our WPF application:
|Various svg files opened in ViewerSvg:
To see the development history of Ab2d.ReaderSvg and ViewerSvg,
check out the related
Information about changes: