Display Input, EncoderDevice, WPF

I am trying to pass input devices through Microsoft.Expression.Encoder, and now I can display them using WindowsFormsHost in WPF, but this is always problematic for other things like the AllowTransparency property etc.

Is there a 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>
+3
source share
1 answer

There is currently no way without WindowsFormsHost.

Here is your way to workaround AllowTrasnparency using WindowsFormsHost. Read the article to keep abreast of transparency modes. There is also an example solution:

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

+1

Source: https://habr.com/ru/post/1777321/


All Articles