Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please, help me with the following question:

first, I create a WPF user control in a WPF User Control Library project; then, I create a new visual studio add-in project, and then in the OnConnection method I call Windows2.CreateToolWindows2(...) method to create a tool window which hosts that WPF user control created in step1. here is the question: the last parameter has always been null.

According to MSDN, I set ComVisibleAttribute to true and enabled <b>Register for COM Interop</b> compiler option. But the problem is still there.

So, please help me! thanks
Posted
Comments
Sergey Alexandrovich Kryukov 1-Dec-11 11:57am    
Why using COM interop if you're using WPF? It makes no sense. You don't need it COM visible or register. Your problem is not clear. Using a user control in XAML is straightforward. What parameter?
--SA
Chef4code 1-Dec-11 23:02pm    
Thanks for your reply, SAKryukov. I've figured it out.:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900