Hi all,
I know you may think this is the wrong forum for a kind of Windows Presentation Foundation question.
But maybe there are spezial thinks to keep in mind with wmf images.
We have DWGs which will be inserted as blocks and we want to show pictures of them in a product catalogue. We tried to use BMP for them but the quality wasn't good enought. So we decidet to use wmf instead. We used them in WinForms before in a picture box. Now we are using WPF and I'm trying to show them. The WPF does not work so I tried to use the picturebox as before:
XAML Code:
Window ...
> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms">
>xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration">
...
>wfi:WindowsFormsHost Height="100">
>wf:PictureBox Width="100" Height="100" x:Name="picturebox1">
>/wf:PictureBox>
>/wfi:WindowsFormsHost>
...
(Sorry but the open tag for > does not work)
Code behind is the same as in WinForms used before...
{code}
this.picturebox1.Image =System.Drawing.Image.FromFile(@"C:\Files\test.WMF");
{code}
...but it does not work.
How can I show a wmf file in wpf?