I added to my WindowsForm app a new WPF window called novoLogin.
After adding it, I added the system.xaml reference….debug fine.
Now I’m trying to open this new window from the existing windowsForm.
novoLogin nl = new novoLogin();
nl.show();
The compiler is giving this error:
Error 1 ‘WindowsFormsApplication1.novoLogin’ does not contain a
definition for ‘show’ and no extension method ‘show’ accepting a first
argument of type ‘WindowsFormsApplication1.novoLogin’ could be found
(are you missing a using directive or an assembly reference?)
This brief article explains how you can achieve this.
If you find yourself in need to open a WPF Window from a WinForms program, this is one way to do it (works for me):
WPF Custom Control LibraryWindow (WPF)From your WinForms app, create and open the WPF Window