Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert SVG to XAML

I tried InkScape & XPS method, but it doesn't give me correct XAML.

Can anyone please convert this SVG to WinRT compatible XAML ?

like image 349
Farhan Ghumra Avatar asked Sep 04 '13 21:09

Farhan Ghumra


People also ask

Can you use SVG in WPF?

Supported SVG ElementsThe WPF SVG render engine supports the following SVG elements: Path - <path>

Can SVG convert to XML?

You can use Android Development Studio (Version >1.4):- To use svg in android application it is required to be converted into xml. Android will automatically convert your svg to xml, and you can get your xml file from resource folder.

Are SVG vector files?

EPS and SVG are both vector-based formats. While vector files are excellent for producing crisp graphics, drawings, and designs at any scale, they struggle to reproduce photographs. Raster-based files like JPEG, GIF, TIFF and PNG are better suited to photography.


2 Answers

Take a look at this and see if it works: https://gist.github.com/timheuer/6443390

Method (yes, superhack):

  • Use Inkscape to save as PDF
  • Rename the Filename extension from PDF to AI
  • Use Expression Design to open AI document
  • Export to Silverlight Canvas
like image 130
Tim Heuer Avatar answered Sep 24 '22 07:09

Tim Heuer


Using Inkscape 0.91 it's possible to open an SVG file and directly save as XAML.

Select Microsoft XAML file as the file type:

enter image description here

like image 23
Drew Noakes Avatar answered Sep 21 '22 07:09

Drew Noakes