title: ResourceDictionary in WPF Control Library
body: <p>We are creating an office ribbon that opens up a WPF window that is stored in another WPF Control library project. 
  That WPF window has some themes attached to it that is stored in a ResourceDictionary that is compiled in a separate project. </p>
  
  <p>However when we load up the WPF window, all the themes from the ResourceDictionary are lost. </p>
  
  <p>We can fix this by manually/forcing the theme on the window itself, but this seems like a bad solution. So my question is: how can I load the theme of the new WPF window from the Office Addin application?</p>
  
  <pre><code>Uri uri = new Uri("/Nov.Presentation.RigDoc.WpfResources;component/Shared.xaml", UriKind.Relative);
              Resources.MergedDictionaries.Add(Application.LoadComponent(uri) as ResourceDictionary);
  </code></pre>