title: Can't find ResourceDictionary to load in code
body: <p>I'm trying to load a ResourceDictionary object into code so that I can check if it contains a certain value before trying to bind to it, but for some reason it can't find the resource. It might be something basic, ie having the wrong build action or URI but can someone point me in the right direction?</p>
  
  <p>The .cs file and the Images.xaml resource dictionary are both in the same folder and namespace</p>
  
  <p>This is the code that is failing</p>
  
  <pre><code>ResourceDictionary resourceDictionary = new ResourceDictionary();
  resourceDictionary.Source = new Uri("Images.xaml", UriKind.Relative);
  </code></pre>
  
  <p>Any idea what I'm doing wrong? getting error message</p>
  
  <p>{"Cannot locate resource 'images.xaml'."}</p>