tags:

views:

13

answers:

1

Hi Experts,

I have created a user control in windows application and used it in wpf. The user control is in a seperate project and solution than that of wpf. I have exposed some properties in the user control and tried to use it in a wpf form. I have used it in the WindowsFormsHost element and also added WindowsFormsIntegration reference. I am facing the following problems:

  1. I am able to see the user control in the toolbox but it is disabled.
  2. I am able to design the user control in xaml and give values to properties. I am also getting the properties in intellisense but the same is not getting reflected/applied during design as well as run time.
  3. I am not able to see the control in the properties window even after selecting it. I am just able to see WindowsFormsHost in the property window.

I am not able to find any sample project or explanation of this in code project. If there is any then please do let me know. Also I am able to use this user control in a windows application very easily and it is working fine. Am i missing anything for wpf? I can give the source code if required but i dont think it will be of much help as i have not done anything fancy.

Please help! Thanks in Advance!

Regards,

Samar

+1  A: 

Is the control project compiled or just added in the solution?
Is the control project compiled as Debug or Release? What language is the control compiled in?

"Walkthrough: Hosting a Windows Forms Control in WPF"

Possible help:

http://social.msdn.microsoft.com/forums/en-US/wpf/thread/2fd0d9dd-eaa9-494d-8ec4-d896c33732d6

jasonk
hi jasonk,The 2nd point mentioned above has been resolved. I dont know how but it did get resolved but i am still not able to find the solution for 1st and 3rd point. As for your questions1. The project is compiled and then added2. I tried it in debug as well as release mode but it is not working.3. The language is C#.I will go through the link u have provided and see if something works out. Please do let me know if you too find out anything on this. Please! Thanks.
samar