May
28th | 2008

Convert Your Vector Graphics Image to WPF/Silverlight Code

Filed under .Net, WPF, Web Development | Posted by Shahar Y

SVG (Scalable Vector Graphics) is an open W3C standard for graphics file format and Web development language based on XML. Those images are made up of lines, curves and other “smooth” elements so when you zoom in on a SVG it stays smooth (unlike GIF, JPEG, PNG).

Imagine you can draw some of your user interface elements in a vector drawing application like: Adobe, InkScape (free) or Skencil (free) and convert your work into WPF XAML or Silverlight XAML. ViewerSVG (SVG to xaml converter) is your tool.

image

Lets look how that sweet animal transforms into xaml:

image

You can now draw your WPF shapes much more easily than in Blend. Save your shapes to SVG files, load them to ViewerSVG and export them to code. Isn’t that great? What do you say?

Tags: , , , , , , , , ,

6 Responses to “Convert Your Vector Graphics Image to WPF/Silverlight Code”



  1. By stelt on May 28, 2008 | Reply

    I understand that it’s great up to the moment where the SVG content is converted into a vendor lock-in format. Isn’t that just throwing away options?

  2. By Shahar Y on May 28, 2008 | Reply

    Hi stelt,

    WPF doesn’t natively render SVG content. If you want to use SVG image in your application, you can overcome this problem using this tool.
    We don’t create here a new image format (vendor lock-in format) - WPF/Silverlight exist to create applications…
    Did I answer your question? Or did I misunderstood it?

  3. By Rickasaurus on May 28, 2008 | Reply

    Ideally, this would be done on the fly by Silverlight so that you could keep your images in an open format inside your database.

    Also, all that XML bandwidth overhead is horrific.

    Do we have more options with Silverlight 2?

  4. By John on May 28, 2008 | Reply

    Xaml is not a graphics format, it’s a declarative language for applications.

  5. By Ben on May 30, 2008 | Reply

    Well I don’t understand all the nay-saying, I think that this is GREAT! Now you can save time by re-using any of your assets that you may have made for Flash in the past, since with the Awesomeness of Silverlight you will inevitably be switching ;)

  6. By stelt on May 31, 2008 | Reply

    @Shahar Y: With SVG you can create applications too. Read http://steltenpower.com/livreSVGeng.html for an update on SVG

    @Rickasaurus: Microsoft is great in making promises, not in delivering. But then you’re already locked-in …

    @John: SVG is much more than a graphics format; read http://steltenpower.com/livreSVGeng.html

    @Ben: I’m a real web person: creatively combining loads of different content and technologies. Converting is always throwing away information. That plus my other mentioned reasons is why i’ll never switch to Silverlight.

Post a Comment

Search Dev102