3

I'm trying to stream input devices via Microsoft.Expression.Encoder and now I can display them with WindowsFormsHost in WPF but it is always problematic for other things such as, AllowTransparency property etc.

Is there any way to display it without WindowsFormsHost?

CODE: (C#)

 App.deviceSource.PreviewWindow = new PreviewWindow(new HandleRef(panel1, panel1.Handle));

XAML

    <WindowsFormsHost x:Name="windowsFormsHost" Background="Black" Margin="12,12,12,59">
        <wf:Panel Margin="0,0,0,0" x:Name="panel1" Size="836,600" />
    </WindowsFormsHost>
Kaan
  • 902
  • 2
  • 16
  • 38
  • You say "it is always problematic for other things such as, AllowTransparency property etc." but that's not much to go on. What other things are you referring to? In what way is it problematic? Is AllowTransparency the only problem you're having? – Dan Puzey Sep 18 '13 at 11:42
  • I can add my specific problem: When AllowTransparency is set to True for a WPF window the PreviewWindow remains empty. There is no visible error, it just doesn't work. – MatthiasG Sep 18 '13 at 13:39

1 Answers1

1

Currently there is no way without WindowsFormsHost.

Here is your workaround for AllowTrasnparency using a WindowsFormsHost. Read the article to be aware of the transparency modes. There is also a sample solution attached:

http://blogs.msdn.com/b/changov/archive/2009/01/19/webbrowser-control-on-transparent-wpf-window.aspx

Chevul Ervin
  • 863
  • 5
  • 9