title: Create a WPF GUI for a c++ API
body: <p>I have a legacy application that exposes a C++ API to allow you to create plugins that extends its functionalities. In order to create a plugin, you need to create a DLL that implement API functions signatures. </p>
  
  <p>The communication between the legacy app and the plugin is in both ways: the legacy app calls the plugin's DLL and the plugin uses callbacks passed as arguments during it´s initialization to call the legacy app.</p>
  
  <p>To extend the plugin functionality, I need to create a GUI. That's where my questions comes....  The first choice would be using <a href="http://www.qt.io/developers/" rel="nofollow noreferrer">QT</a>, but I´m really trying to avoid it because of my background(I don't like it) and also because the GUI would be not be running in the "main thread", causing some problems.</p>
  
  <p>What I really would like to use is WPF. Is it possible to compile WPF GUI as a class library, call it from DLL C++? (like figure below)
  Or it is a dumb question?</p>
  
  <p><a href="https://i.stack.imgur.com/yiiY9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yiiY9.png" alt="enter image description here"></a></p>
  
  <p>Obs:</p>
  
  <ul>
  <li>I can use both C++ and C++/CLR</li>
  </ul>