Cognex In-Sight SDK - controls for WPF

472 Views Asked by At

I've hardly tried to use Cognex In-Sight SDK together with WPF app. In the SDK there are some examples but unfortunately only for WinForms. I was wondering that I can make a Host for WinForm control fron Cognex DLL, but with no succes. I've added WinFormsIntegration and also System.Windows.Forms.dll. I added a namespace in XAML:

        xmlns:cognex="clr-namespace:Cognex.InSight.Controls.Display;assembly=Cognex.InSight.Controls.Display"

and as well tried to use:

<WindowsFormsHost HorizontalAlignment="Left" Height="244" Margin="314,73,0,0" VerticalAlignment="Top" Width="275">
        <cognex:CvsInSightDisplay Name="Display" />
    </WindowsFormsHost>

but it throws: The name does not exists in the namespace. Strange, because when typing the exactly the same contol name is suggested.

Is there any other option to get Cognex controls in WPF? OpenAI suggested the file named Cognex.InSight.Controls.Wpf.dll but I can't find it.

Regards. Piotr.

0

There are 0 best solutions below