Click here to Skip to main content
15,898,939 members

Comments by neyerMat (Top 6 by date)

neyerMat 5-Dec-13 11:02am View    
Reason for my vote of 5 \n thanks for sharing
neyerMat 20-Jun-12 9:16am View    
another great article how to create metafiles:
http://www.codeproject.com/Articles/177394/Working-with-Metafile-Images-in-Net#_rating

That's more or less exactly what we do in our programm, but with C++. That make things a lot easier. You can create UserControls which can render on any System.Drawing.Graphics device.

asfaik and also regarding to the solutions provided, nothing similar exists for WPF.
neyerMat 14-Jun-12 6:48am View    
http://social.msdn.microsoft.com/Forums/zh/wpf/thread/803b1f4b-5a70-4fa7-9f1a-d4d84aeb5deb

This gives more information about the effort to export SVG... any tipps for another format??
neyerMat 13-Jun-12 4:33am View    
http://answers.microsoft.com/en-us/office/forum/office_2010-word/svg-does-not-paste-properly-into-word/b24a9fc2-1093-49bd-ad9e-6f7585e8934a

just to let you know how "good" SVG works together with MS-Office.

Another point of view is that Microsoft itself do exactly the same for PostScript Printers.
http://msdn.microsoft.com/de-de/library/ms742418.aspx

BUT it's just not possible to use that already implemented feature...
http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/dab2607b-1119-41d6-bf1d-6df02cbd4951

It's getting more and more frustrating. It seems that there is NO SOLUTION to create a vector graphic from WPF. WMF/EMF is dead (but still in use...), SVG is not supported by Microsoft (big A vs. big M???) XPS is not supported by anyone except MS.

At the moment the only solution seems to generate EPS files with a virtual printer or JUST FORGET WPF!

For me it looks like Microsoft want to push their own standards (XAML, XPS) and just don't support other formats to make the new file-formats popular...
neyerMat 12-Jun-12 4:24am View    
Thank you for your answers(s)

I don't want to mix up the technologies. I just want to figure out which one is the right to develop my application. As already mentioned above the current software is written in Visual C++. It works fine but it's getting harder day by day to maintain this "piece" of code (~300 000 lines).

Now we want to redesing the whole program. I already made several sample applications in WinForms and WPF to analyze which technology is the right one.

For WPF there are a lot of possibilites as you already suggested. the following article discribe a very good solution how to get things done in WPF. http://www.codeproject.com/Articles/24681/WPF-Diagram-Designer-Part-4

Our application is a little bit mor complex. Instead of single shapes we would have complex UIElements such as Charts, TextBoxes, Images, etc. The software is like a report generator but the user can design the layout at runtime.

That's still a lot of work, but no big deal if you have only to get the results on screen and print them.

But we have to export the outputs as EMF (or any other accurate format) to import it at least to MS-Office.

afaik WPF does NOT bring this functionallity out of the box. So the way we would have to go in WPF is write each UIElement on our own with basic Shape objects. Than write a Export method which "translate" the WPF shapes to the desired file format.

As WPF already works with vectors for me it seems to reinvent the wheel (I know that WPF is more than just 2D-charting and the fileFormats such as EMF or SVG are not capable of all the possibilties that WPF has)

But with this restrictions WPF seems not to be the best choice, even if it has Zoom and Pan,etc. already implemented(also MFC(GDI+) can do that more or less out of the box).

To bring it to the point:

How to design the UIElements (charts, text, images, mix of both) to export it as EMF or similar?

The way above seems to be the only solution but with a huge effort (Write EMF or SVG export from scratch). Any other ideas???

[edit]
In fact EMF just stores a stack of GDI commands. Maybe it's not the correct format when using WPF. Anyway.. is there any file format which should do the job for WPF?? How do others export their results? Screenshots? :-\ XPS? Workarounds with virtual PDF or GhostScript Printers???