ViewerSvg is a svg to xaml converter for WPF and Silverlight.
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®
Illustrator®, CorelDRAW®,
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
or Silverlight.
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 or Silverlight
platform enables.
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.
Features:
- Convert svg and svgz files into xaml for WPF and Silverlight.
- 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.
Screenshots:
| 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: |
|
|
|
|
Related Blog posts
To see the development history of Ab2d.ReaderSvg and ViewerSvg,
check out the related
blog posts.
Versions history
New in version 2.4
- Added changing size of already read objects.
- Added progress report window when reading larger svg files.
- Added option to read hidden elements.
New in version 2.3
- Added object selection mode
New in version 2.2
- Added additional options to xaml export dialog (to produce xaml with better support in Visual Studio 2010 and Expression Blend visual designer for Silverlight projects)
New in version 2.1
- Added support for showing custom properties defined in svg file - added into Ab2d.ReaderSvg
4.0
- Improved selection of objects
- Added Export image button - export selected element into bitmap image
- Added batch convertion of svg files to XAML for Silverlight
New in version 2.0
- Added support for Geometries - added into Ab2d.ReaderSvg 3.0
- Added export of images embedded into svg file.
New in version 1.5
- Added AutoSize checkbox (supports new AutoSize property on Ab2d.ReaderSvg)
- Added automatic error reporting - when an exception occurs in ViewerSvg or Ab2d.ReaderSvg,
user can now submit error information to help resolve the problems.
New in version 1.4
- Changed to support new licensing model in ReaderSvg 2.1
- Added command line support to enable batch conversion
New in version 1.3
- Added support for Silverlight 1.0 and 2..
- Added object selection with mouse.
- Added export dialog with xaml text and preview tabs.
- Added selecting number of decimals in the exported xaml (useful for optimizing
the size of exported xaml).
- Added possibility to export only selected elements.
- Rename objects with double clicking on them
- Show the whole image when opened (before the left lower part of the image was hidden
by the ViewerSvg buttons)
New in version 1.2
Information about changes:
Subscribe to RSS feed to all Blog posts.
Follow me on twitter.
Subscribe to newsletter - enter your email into Newsletter box on my Blog.
|