Ab2d.ReaderWmf is a class library that can be used to read Windows metafiles (wmf)
and also Enhanced Metafiles (emf) in runtime and import its elements into WPF's Viewbox.
.Net 5 and newer notice:
Ab2d.ReaderWmf library do not provide a special build for .Net 5 or newer framework. But the library can be still used in .Net 5 and newer frameworks because newer frameworks support using assemblies build with older framework version.
But to distribute a .Net 5 or newer application you will not be able to use standard licensing with license.licx files. You will need to use licensing by using "Application license key".
Paste2Xaml is a WPF application that is using the Ab2d.ReaderWmf and can read Windows metafiles (wmf), Enhanced
Metafiles (emf) or get matafile objects from clipboard and can convert them into XAML.
Main Paste2Xaml window - a Power Point slide has been pasted to the Paste2Xaml application (showing as WPF elements).
Export Dialog - showing the xaml text and all the export options for a metafile. It is possible to export xaml for WPF, Silverlight, Windows Phone and Windows Store apps.
It is also possible to export to Enhanced Metafiles (emf) - useful for saving clipboard data that can be later opened with Ab2d.ReaderWmf.
The objects from metafile can be exported as Shapes or as Geometries. Geometries export provide additional options to optimize for better performance and lower memory usage.
The graph from Microsoft Excel 2003 shown in XamlPad.
The following screenshot is showing Paste2Xaml with opened metafile that was created in AutoCad:
Screenshots of sample metafiles
The following images show screenshots of metafiles converted to XAML and show in IE (click
on image to see it in full size):
With Ab2d.ReaderWmf library it is possible to
build ResourceDictionares from metafiles. This means all metafiles are converted
into xaml which makes them much more efficient and easier to use.
To make building ResourceDictionares there is a ResourceDictionaryWriter sample
application that is available with full source code so it can be fully customized.
The following screenshot shows ResourceDictionaryWriter application with three metafiles
added to the ResourceDictionary (xaml of ResourceDictionary can be seen on the right):
Versions history information
To see the development history of Ab2d.ReaderWmf and Paste2Xaml, check out: