A First Attempt at Exporting XAML from Visio 2007


[Update on 2008-08-05]


Thierry Bouquain took this sample to the next level with much better results: http://www.ucaya.com/blog/2008/02/05/ASecondAttemptAtExportingXAMLFromVisio2007.aspx


I found that Andrej Benedik wrote a library from that reads SVG and outputs XAML. Remembering that Visio can import and export SVG, I did an experiment to see how far I could get with a Visio 2007 Add-In to export XAML.


image


Results



  • The library doesn’t handle the text content of shapes from Visio. I suspect this has to do with it not handling SVG <tspan> elements.

  • Gradients didn’t work (see examples)

  • Maybe useful for simple shapes (see examples)

Final Thoughts



  • It was worth a try

  • Source code and sample files attached

Example: Simple Drawing



Input Visio


image


Intermediate SVG exported by Visio (and loaded back into Visio)


image


Intermediate SVG exported by Visio (and loaded into Adobe Illustrator CS3)


image


Output XAML shown in the Andrej’s ViewerSvg tool


image



Example: Gradients


Input Visio


image


Intermediate SVG exported by Visio (and loaded back into Visio)


image


Intermediate SVG exported by Visio (and loaded into Adobe Illustrator CS3)


image


Output XAML shown in Andrej’s ViewerSvg tool


image


Comments (0)