06-30-2010, 10:06 AM
Hi all,
I'm trying to get a metafile that I have transform an Image with
Now I have my image control but I'm stuck to get the content as metafile.
I guess the ReaderWmf is not able to do that?
Do you have a solution because I need to do some transformation on my metafile and serialize it as XAML.
Regards,
Antony.
I'm trying to get a metafile that I have transform an Image with
Code:
ReaderWmf metafileReader = new ReaderWmf();
Metafile metafileImage = Clipboard.GetData(DataFormats.EnhancedMetafile) as Metafile;
IntPtr hEmf = metafileImage.GetHenhmetafile();
Image myImage = metafileReader.GetGeometryFromHemf(hEmf, GeometrySettings.BasicOptimization);
string xamlStr = metafileReader.GetXaml();
Now I have my image control but I'm stuck to get the content as metafile.
I guess the ReaderWmf is not able to do that?
Do you have a solution because I need to do some transformation on my metafile and serialize it as XAML.
Regards,
Antony.