XAML or windows.media.drawing -object to PowerPoint Slide

Hello,

I'm trying to add a "screenshot" of XAML -usercontrol to PowerPoint in vector graphics. I have found a component that converts the XAML to system.windows.media.drawing -object, and on the other hand Aspose.Slides -object can take a System.Drawing.Imaging.Metafile as input format.

Is it possible to somehow convert System.Windows.Media.Drawing -object (found in PresentationCore.dll) to System.Drawing.Imaging.Metafile so that the image would be preserved in vector format? Or are there any other way to add a s vector screenshow of xaml to PPT?

Thank you already in advance.

- Antti Rasi

Hello Antti,

You should search on internet how you can convert your System.Windows.Media.Drawing object to Bitmap. Thereof, you will be able to add it using Aspose.Slides.

Please see, System.Windows.Media.DrawingImage class, it takes System.Windows.Media.Drawing as an argument to its constructor and it has a property DrawingImage.Metadata, check if you can use it to get a bitmap.

Also see this one. I think, it generates a bitmap from a metadata.