title: pack://application:,,,/ResourceFile.xaml Never Works
body: <p>I have never been able to get this format of reference a Resource Dictionary to work. What am I missing.</p>
  
  <p>Scenario:</p>
  
  <p>Creating and assembly with some usercontrols in it.<br />
  At root have said file <strong>{root}/Themes/ColorThemes.xaml</strong> <br />
  The ColorThemes.xaml file has its build action set to <a href="http://msdn.microsoft.com/en-us/library/aa970494%28v=vs.110%29.aspx">Resource</a>.<br />
  Then in in xaml file further down let say <strong>{root}/Controls/ButtonStyles/Themes/ButtonThemes.xaml</strong> (note the path is just an example)
  in this file I have the following bit of code:</p>
  
  <pre><code>&lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="pack://application:,,,/Themes/ColorThemes.xaml"/&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  </code></pre>
  
  <p>As far as the <a href="http://msdn.microsoft.com/en-us/library/aa970069%28v=vs.110%29.aspx">documentation</a> states this should work (as I understand it), and while I am in the designer it seems to be fine (all the colors load etc) however when I then go and compile my application and run it I get this error {"Cannot locate resource 'themes/colorthemes.xaml'."} which is strange because it seemed to be using just fine in the builder. So I am quiet confused because it seems to not coincide with the documentation.<br /> So if someone can explain to me what I am missing :) <br /></p>
  
  <p>Note: if I change the previous code to </p>
  
  <pre><code>&lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="../../../Themes/ColorThemes.xaml"/&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  </code></pre>
  
  <p>It works fine, however for cleanese pack://application: .</p>