WPF + AX 2009

Hello Everyone.

How can we use WPF .NET controls in AX 2009 ?

Please guide me in this matter as i am a noob in this field …

It’s not completely straightforward so think twice whether you want to do it.

AX2009 has no ManagedHost control as AX2012 has, but it supports ActiveX controls, therefore you have to expose your WPF control as ActiveX. First place the WPF control into a Windows Forms control (with the help of ElementHost). Then turn the WinForms control into ActiveX control - see Exposing Windows Forms Controls as ActiveX controls.

We actually use this approach in one of our products.

Lets say we have exposed our WPF .Net control as ActiveX .

After that how can we use that ActiveX control in AX ?

It will be great if you help me out this matter with a good illustration.

And one more thing , where we have to place our ActiveX control such that we can use it in our AX Form ?

You’ll add a control of type ActiveX to a form in AX (in the same way as you add Grid controls, for example) - AX will display ActiveX Browser where you’ll select your ActiveX control. The control needs to be properly registered on the client machine, of course. You can use Regsvr32.exe for that.