Can I use ADX with WPF Application?

Add-in Express™ Support Service
That's what is more important than anything else

Can I use ADX with WPF Application?
 
Kirill Lapin


Guest


Hi there,

I searched for an answer in this forum and the learning center. While there are some topics around WPF they all seem to be very old. Some even suggest that it is possible to use WPF forms (as opposed the WPF controls) and that the long list if issues was reduced to one (WPF combo-box), but there is no clear explanation on how it is achieved. I am using VS2017 and only WPF Control is available to be added to mu ADX Excel Add-in solution. Can anyone please shed some light on this? For clarity: I don't even need ADX to interact with the WPF Form, just need the ability to call from a ribbon button a sub-procedure that would display the WPF form. At the moment I am clueless as to how to add a WPF Form to an ADX-generated solution.

Many thanks,
KL
Posted 20 Dec, 2018 19:45:34 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Kirill,

The ADX based solution is a WinForms class library, you cannot add a WPF Form to such kind of projects. However, you can use the ElementHost control to show your WPF Control, please have a look at the following MSDN article for more details:

https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/walkthrough-creating-new-wpf-content-on-windows-forms-at-design-time

Probably there exists another solution but I have not tried it:
https://stackoverflow.com/questions/8534056/add-wpf-window-in-a-winforms-project-in-vs-2010
Posted 26 Dec, 2018 08:52:22 Top
Kirill Lapin


Guest


Thank you Dmitry. This is very helpful.

Happy holidays,
KL
Posted 26 Dec, 2018 22:36:39 Top