I do not know any online tutorial for this; but that should not be a big problem. I tried to implement smth like this, and it worked fine for me, below is the sequence if the steps I took are:
1.add "user control wpf user" or "wpf custom control" for your solution.
2. Attach the new WPF window class (Add-> Window → ...) to the new project. Then add that wpf ever controls how you like in the new window to check if it works later
3.add a new class and interface to the library project and define it as an example below:
[ComVisible(true)]
[Guid("694C1820-04B6-4988-928F-FD858B95C881")]
public interface ITestWPFInterface
{
[DispId(1)]
void TestWPF();
}
[ComVisible(true)]
[Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123F"),
ClassInterface(ClassInterfaceType.None)]
public class TestWPFInterface : ITestWPFInterface
{
public void TestWPF()
{
Window1 form = new Window1();
form.Show();
}
}
4. Make your prefab com visible (register for the interop COM key on the Build tab of the project properties) and assign it a strong name (see the signature tab); generate key using sn utility
5. your_wpf_lib.tlb, debug\release
6. ++ ( , ), :
"C:\full_path_to_your_tlb\your_wpf_lib.tlb"
tlh win32.
++:
TestWPFForms::ITestWPFInterfacePtr comInterface(__uuidof(TestWPFForms::TestWPFInterface));
comInterface->TestWPF();
wpf.
, :
COM- .NET # ++
WPF Win32
, ,