views:

1709

answers:

3

Are there any libraries which

  1. Allow to draw svg direct to a Windows Forms application
  2. to a WPF application

I draw graphics and design everything with Inkscape, because I love that program. Then I have those stunning svgs and have to either export them to png (WinForm) to use them or convert them to xaml-code (WPF) (Kaxaml helps me).

Is there a way to directly use my svgs?

+2  A: 

Wow, I just read that Inkscape supports saving as XAML. I didn't realize that up to now shame.

But that still doesn't solve my problems with WinForms...

Peter
unfortunately it is not yet ready, it is going to be implemented and hopefully it will be out with version 0.47 of Inkscape
marco.ragogna
+2  A: 

Yes, you can use ReaderSVG to get WPF directly from XAML.

Kent Boogaart has a nice example of using a little WPF inside WinForms which would help you solve the WinForms aspect.

Andy Dent
+3  A: 

I personally hate how there's no native support for SVG in Microsoft's products/development tools. I've found two fairly complete but still immature SVG libraries that seem to be active as of this writing, definitely in need of contributors though.

IIRC both libraries output a Drawing object which can be used directly through the Image class; You'll figure it out, they're both pretty straightforward to use.

Hannson