title: Setting an image.Source from a resource file
body: <pre><code>private void SetCredentials()
  {
      username = txtfromEmail.Text;
      password = txtpassword.Text;
  
      pictureLogin.Source = @"C:\Users\Sergio\Documents\Visual Studio 2008\Projects\emailwpf\emailwpf\ok.png";
  }
  </code></pre>
  
  <p>I get an error: <code>"Cannot convert string to ImageSource"</code>.</p>
  
  <p>What can I do?</p>