Can Windows Presentation Foundation read/write WMF/EMF files without having to use WinForms Interop or Win32.
If it does not, what is the reason?
Can Windows Presentation Foundation read/write WMF/EMF files without having to use WinForms Interop or Win32.
If it does not, what is the reason?
A quick search on MSDN reveals a thread containing a post by Peggi Goodwin, a PM at Microsoft:
WPF does not support the EMF and WMF image formats. These formats are more susceptible to security vulnerabilities than other image formats, so we do not intend to support them.
I did it !!!
I'm using ComponentOne's WPF chart in my real code but to keep the example simple I just did a button. But it DOES work on Complex wpf widgets. Fonts, Transparency, AntiAlias etc. everything works. And I can paste into Word and change Labels on Charts etc.
Basically I decimate the XAML to XPS then import it Back into XAML.
Then I uses an open source project that converts XAML to WMF called XAMLToys.
XAMLToys would fail 99% of the time because you could not serial complex XAML objects
http://softronix.com/download/WpfToWmfClipboard.zip
Big Kudo's to these two projects
I'm only allowed one Link :(
h t t p://xamltoys.codeplex.com/
h t t p://khason.net/blog/converting-fixeddocument-xpsdocument-too-to-flowdocument/
Hi user269038. Thanks for your solution! It seems to work as charm except that i get all the texts as paths and not as strings that could be edited in Word/PPT etc.
The fact that all the texts will get copied as vector grafics makes the final Word/PPT-documents very large in file size (especially if there are loads of text to be copied). Have you had the same problems? Do you happened to know any solutions?