micha r

micha r

  • NA
  • 1
  • 838

Integrating a WPF into an existing Word AddIn

Jan 26 2014 5:02 PM
Hi,
 
Disclaimer: I have so far only written small single purpose applications, I would consider myself  a entry level coder. I have no experience whatsoever using WPF or XAML.
 
I have written a MS Word add in that tracks metadata for .docx documents. I am now trying to integrate an interface so that users are able to analyze the metadata connections between the files. I have added a custom button that builds a graph depending on the information found, the last step left is the visualization of said graph. 
I decided to use Graphsharp, a pretty cool library for visualizing graphs.  I followed an example by Sacha Barber on how to use WPF and XAML forms to create a window.
Now I got the following issue, I have no clue how to connect the WPF application with my existing AddIn. How do I initialize the component from within my existing application? I got a MainWindow.xaml and MainWindow.xaml.cs, but my application runs out of my ThisAddIn.cs.
 
I am happy to provide code, but I am unsure which bits are needed and I doubt it helps if I just copy paste all my stuff.
 
Thanks for any help provided!