Click here to Skip to main content
15,897,032 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi all

I have some (more than 2000) .emf images. These are very simple images, say, in each .emf file there is only a circle.

Now i want for every circle a xaml path.

I know how to get this path manually: There is a tool Paste2Xaml.exe (downloadable for free) which can make this conversion.

Has anyone an idea, how to do this programmatically, or is there another solution than really to this conversion for all 2000 files?


Thanks for any help!
Posted
Comments
Maciej Los 29-Apr-15 8:58am    
What's an issue? XAML is an XML-based markup language developed by Microsoft. You can edit it via using XML classes.

Please, read my comment to the question.

Here is an idea:
Quickstart: Accessing files programmatically (XAML)[^]
How to: Load and Display Metafiles[^]
 
Share this answer
 
Comments
Member 10781325 29-Apr-15 9:29am    
Thanks for your anwser, but i do not really understand, what you where writing. Can you try to explain it to me?

What is the strategy you think at?
Ok, i found a solution:

I downloaded the dll ReaderWmf. After adding this dll to the project, the following code works for me ( i know, that there are exactly 2 paths in a .emf file.)


Viewbox box = Ab2d.ReaderWmf.Instance.Read(@"C:\Users\tkr\Desktop\16A-00.emf");

Canvas canvas = (Canvas)box.Child;
Path path1 = (Path)canvas.Children[0];
Path path2 = (Path)canvas.Children[1];


thx to all which helped me finding a solution!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900