title: How to refer to Embedded Resources from XAML?
body: <p>I have several images that i want to be Embedded into the exe.</p>
  
  <p>When i set the <strong>Build Action</strong> to <strong>Embedded Resource</strong>
  I get through out the code an error that the Resource isn't available and asking me to set the Build Action to <strong>Resource</strong></p>
  
  <p>I Tried several different methods :</p>
  
  <pre><code> &lt;ImageSource x:Key="Image_Background"&gt;YearBook;component/Resources/Images/darkaurora.png&lt;/ImageSource&gt;
  
   &lt;ImageSource x:Key="Image_Background"&gt;Images/darkaurora.png&lt;/ImageSource&gt;
  
   &lt;ImageSource x:Key="Image_Background"&gt;pack://application:,,,/Resources/Images/darkaurora.png&lt;/ImageSource&gt;
  </code></pre>
  
  <p>This code sits in a Resource file.
  But none worked, they all throw this error :</p>
  
  <pre><code>Cannot convert the string 'pack://application:,,,/Resources/Images/darkaurora.png' into a 'System.Windows.Media.ImageSource' object. Cannot locate resource 'resources/images/darkaurora.png'.  Error at object 'Image_Background' in markup file 'YearBook;component/Resources/ImageResources.xaml' Line 4 Position 6.
  </code></pre>
  
  <p>And in different places in code i get :</p>
  
  <pre><code>the file 'YearBook;component/Resources/Images/shadowdrop.png' is not a part of the project or its 'Build Action' property is not set to 'Resource'
  </code></pre>
  
  <p>So, What am i doing wrong?</p>