title: C# App.xaml and Resource Dictionaries
body: <p>I'm trying to get my application (WPF) use a referenced assembly in my App.xaml using Pack URIs. In my solution I have several projects. In the base application, I just have my App.xaml. I would like this to use a referenced assembly. </p>
  
  <p>Call my base project with App.xaml Project 1 (in the solution). This is the relevant part of App.xaml:</p>
  
  <pre><code>&lt;Application.Resources&gt;
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="pack://application:,,,/MyProject.Project2;component/Themes/Generic.xaml" /&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p>Project 2 has a folder "Themes" with Generic.xaml. I'm fairly sure that I'm doing the Pack URI incorrectly because none of the styling in Generic.xaml is being used (I'm overriding the default window with a custom window, but it does not currently work. Application shows up with default window styling, everything inside the window is black).</p>
  
  <p>Folder hierarchy:</p>
  
  <pre><code>MainFolder
      Project 1
          App.xaml
          bin
              Debug
                  Application.exe
      Project 2
          Themes
              Generic.xaml
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li>Can someone explain the <code>pack://application:,,,</code> syntax? What does all of this mean?</li>
  <li>What am I doing wrong with the Pack URI?</li>
  </ol>
  
  <p>Thanks in advance.</p>