views:

52

answers:

2

I am looking for some source code and a project to download and look at that has an Active X control hosting WPF. I can not find any source code anywhere on the net.

I can not add a WPF resource the usual way in an Active X control. I have to add it manually to the reference section.

A: 

Not sure if this is even possible. I would check out WPF browser applications. That may be a better solution for you given that if you are going to be running an active x control with WPF the user will need 1) Internet Explorer and 2) .net 3.0+ installed locally. A WPF Browser application will work with IE if the user has .net 3.0+ installed and will work with IE and FireFox if the user has .net 3.5+ installed. Check out WPF Broswer Apps here: http://msdn.microsoft.com/en-us/library/aa970060.aspx

Nathan Totten
A: 

It should be possible, although I don't have the code for it off-hand. You can create an HwndSource, which allows a normal window to host WPF controls, in your ActiveX controls. Then it is only a matter of adding your WPF UI to that window.

Andy