title: How to programmatically set the Image source
body: <p>When the Image's Source property is set the following way, the picture is taken from <code>/Images/down.png</code>.</p>
  
  <p>How would I do the same thing programmatically?</p>
  
  <pre><code>&lt;Image x:Name="myImg" Source="/MyProject;component/Images/down.png" /&gt;
  </code></pre>
  
  <p>The following would not work, since Image.Source property is not of a string type.</p>
  
  <pre><code>myImg.Source = "/MyProject;component/Images/down.png"; 
  </code></pre>