How to use EPS files in a WPF or Silverlight application? - wpf

I have a few images in EPS format which I would like to use in my WPF application. Is this possible?
If not, is there a way to convert them to XAML so I can use them directly in WPF? I don't have a budget for Expression Design or Adobe Illustrator, and there are only a few images to convert.

You can use Inkscape http://www.inkscape.org/. It will allow you to import EPS file, but you'll need to have GhostScript installed for that. Inkscape uses SVG format and will allow you to export from SVG to XAML.

Related

.3ds file import into Silverlight

I have a .3ds file that I want to import into the 3D Viewbox in Silverlight.
I am currently using Expression Blend.
Is this possible? And if so, how? Thanks!
You need it as .Obj format.
Expression Blend can import 3D content in the .obj file format. For
these files to render correctly, you must also import the material
file (.mtl file) that defines the materials used on the 3D object, and
import all of the image files that are used in the material file.
If you need a free tool to convert in try Blender or Meshlab.

Preferred Vector Image format for use in WPF?

As per the title, what's the preferred image format (or formats) for use in WPF?
My company will hire a designer to design some logos, images, toolbar icons, etc. for use in a WPF application. I was going to ask for Vector Graphics as they are supposed to stretch, shrink, etc without loosing clarity;
However, reading this post
Does WPF support reading/writing WMF/EMF files natively?
and others has got me worried; IT DOES NOT SEEM LIKE A SIMPLE TASK?! isn't this what WPF is supposed to handle natively in its sleep ?! stretch, rotate, throw flames, make toast, etc...
The preferred vector image format is XAML. There are a lot of ways for a designer to generate those graphics. Adoble Illustrator for example can use the XAML exporter. The open source tool Inkscape can export to XAML directly, a designer can also draw XAML using Microsoft Expression Design and Microsoft Expression Blend. Literally all vector graphics tool support SVG and there are a lot of ways to convert SVG to XAML.
Don't bother with WMF/EMF it will just look ugly since windows can not render them antialiased.

Converting EPS to Xaml

I have bunch of EPS vector files that I want to convert to Xaml (WPF version, not Silverlight). What's the best tool for the job (Preferably a free one)?
You can use Blend (3+ only), to import EPS. Not sure about free tools, but if it's a one off you could just grab the trial of Blend 3.
Correction:
You can't import EPS with Blend, only .ai. You can convert your EPS to .ai and then import into Blend.
Alternatively, there's similar question here that might help.

Importing WMF (Windows Metafile) or any other vector file into a silverlight project

Is it possible to import WMF (Windows Metafile) or any other vector based file into a silverlight project?
You can use Paste2Xaml to convert WMF/EMF to XAML
http://www.wpf-graphics.com/Paste2Xaml.aspx
And (from the same source) ViewerSvg to convert SVG to XAML
http://www.wpf-graphics.com/ViewerSvg.aspx
Also, for SVG, InkScape has a XAML export feature and there's a XAML export plugin for Adobe Illustrator somewhere, for WMF, Microsoft Expression Graphics Designer (what a short name) is supposed to be able to import WMF and export XAML, but I haven't used those myself.
You may want to have a look at free Silverlight Contrib project at codeplex. It comes with control to display WMF and EMF files.
Inkscape can import wmf and export xaml: http://www.inkscape.org.
I don't know of a direct way, but I've definitely transformed SVG into XAML successfully before. See this brief guide.

XAML Vector to Illustrator or similar

I can easily enough go from Adobe Illustrator and make a XAML file via the XPS Virtual Printer, but is there any way to import Vector graphics defined in XAML into Adobe Illustrator to continue working on it?
Cheers
Nik
You could try using Inkscape to convert your XAML into a format Illustrator understands. It support XAML import and export.
Export your drawing in Expression Designer as PDF or PSD and open it in Illustrator

Resources