Mechanik
Mechanik

Reputation: 679

WPF and Windows Forms Mixed Environment Issue

I have a WPF dll with a user control. It works just fine when I use it in a WPF project as a reference.

I needed to test in a mixed environment. So I created a Windows Forms solution, added the reference to both the WPF dll and the WindowsFormsIntegration dll. I placed an ElementHost in the form.

In the code behind, I called using on the WPF user control namespace, created an object of the user control and assigned it as the child of the ElementHost. Till this point, intellisense also seemed to work fine. The moment I built the project, however, I got a build error saying that the WPF namespace that I had used was not found.

All dlls are built in .NET 3.5 and the client solution is also in .NET 3.5. Is this a known issue? What could be off with this scenario?

Upvotes: 0

Views: 495

Answers (1)

Magesh
Magesh

Reputation: 403

Can you please follow the following link to check whether you have referred all the dll's which is necessary to run WPF custom control in Winform

http://msdn.microsoft.com/en-us/library/ms742215.aspx.

Upvotes: 1

Related Questions