This project has moved and is read-only. For the latest updates, please go here.

Converted XAML File use

Topics: Converters and Runtime, Tips and How-To, Viewers and Squiggle
Dec 5, 2011 at 6:00 PM

Hi guys,

I'm appreciating your work.

I downloaded and used project executable to translate a Visio file in XAML, specifically a UML conceptual class diagram to manage it in a WPF application

My process:

- Translate  my .vsd in .svg with Visio 2007 SP2

- Import .svg and obtain .xaml with SVG-WPF Converter (library 1.0)

The converter is able to show me the drawing and the XAML correctly.

Now, I'm not able to view the file in VS2010 designer or load the file dynamically in my WPF application.

Have you got some suggestions?

Thank you so much



Dec 6, 2011 at 2:11 AM

Hello Paolo,
There are a number of ways of  using the results depending on your needs.

The viewer in the converter is built using a control in the provided library so that you can also
use that directly in your applications. See the Samples directory for simpler illustrative examples
on how to use the Canvas or ViewBox controls provided.

Also, if you do not want to use the provided library in viewing the results, then you can turn off
the support of runtime library during the conversion and use DrawingImage image source to display
the results.

Best regards,

Dec 6, 2011 at 5:22 PM

Hi Paul,

My objective is to have the visio drawing (the mentioned UML class diagram) available in a canvas with the possibility to interact with inside shapes (e.g. select a shape and show some detailed information)

Initially I supposed it was necessary translate it in xaml. As I understood, I could

1) Translate .vsd only in a .svg file avoiding the successive xaml conversion step. 

2) Interact with it through your svg control.

Further, I understood the SVG-WPF project is based upon the existence and combination of both .svg and .xaml file (the .xaml addresses some information contained in the .svg ). This is the reason you have a dedicated control and implicitly suggest to interact directly with .svg. Is it correct?

Am I following the correct path to reach my objective using your code resources?

So, I downloaded and checked your suggested examples and I introduced svg canvas control

a)referencing the assemblies,

b)importing the namespace xmlns:svgc =

c)declaring the control: <svgc:SvgCanvas Source="Resources/Marketing.svg"></svgc:SvgCanvas > 


No problem at design time, error at runtime


'Initialization of 'SharpVectors.Converters.SvgCanvas' threw an exception.'

with the following detail : Inner exception {"'xlink' is an undeclared prefix. Line 40, position 9."}.

Could you help me ?

Thank you so much.


Dec 7, 2011 at 8:55 AM

Hello Paolo,

Please take a look at the tutorial here

The last example illustrate this. You can run this sample code, it is available with the downloads.
If the sample works, then compare it to your codes to determine what is going wrong. Sometimes
debugging WPF can be crazy.

Best regards,

Dec 7, 2011 at 10:36 AM
Edited Dec 7, 2011 at 2:48 PM

Hi Paul,

I checked the tutorial, it performs things as I'm doing.

I verified my testExample with your test.svg (image with japan flag). Everything is OK.

So, I'm supposing the exception I get is due to my drawning complexity and the rendering actions of your svg canvas control.

Is there the possibility to send you my .vsd file and the corresponding .svg?

I'm appreciating the rigorous approach of your explanations, visible in the tutorial too.






Dec 7, 2011 at 10:41 AM
Edited Dec 8, 2011 at 3:18 AM

Please edit and remove your email address to avoid spam, since this forum is opened.

To contact anyone on Codeplex (unless he/she does not allow it), please use the profile.

Best regards,