The long winded road of XAML

I was playing with Silverlight and Expression Blend trying to create a small animated figure to use in a project. I had the image in PNG format, but I needed it in XAML so I could animate parts of it.

Surely Blend would have an import from PNG option? Or convert PNG to XAML? Nope! Ok, Google is my friend. Must be a whole lot of free software that does the trick. Well, either there aren’t or I’ve become really lousy at using Google.

What I did find however was a lot of people asking the same question on different forums and sites. The best solution I found was a two step method. First convert the PNG into SVG, and then convert the SVG into XAML.

For converting an image into SVG I came over a site called Vector Magic, they have a really good online flash based service with lots of options and preview capabilities. The downside is that they actualy cost money, but if you register you’ll get a couple of conversions for free.

So after a couple of minutes of tinkering with different options I ended up with a nice vector version of my PNG image in SVG format.

Back to Google to search for SVG to XAML. Again a nice online service, this time actually free and as a bonus written in Silverlight. XamlTune lets you paste in the SVG code and will convert and preview the resulting XAML.

So now I had a XAML version of my original image. The downside was that it was just a couple of endless PATH’s with x,y coordinates. I used a small eternity to find out where to cut the PATH’s into the figure’s various parts so that I could animate the right part or it.

Silverlight, XAML and Blend are all nice and fun, but if your design is all about photoshop and PNG then prepare for a lot of extra work :)

And what was this image all about? I can not tell you, if I did I’d have to kill you. Sorry.

This entry was posted in Development, Ramblings, Technology and tagged , , , . Bookmark the permalink.

One Response to The long winded road of XAML

  1. Nice to know, can be useful later !

    Have a nice Easter ! Stefaan

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>