title: Referencing XAML using a string C#
body: <p>I have a button which, when pressed will change the source of a certain Image. I'm currently calling a method which takes the parameter of a string (the x:Name of the image which I would like to change). However, in the method, I don't know how I can access that string, as it doesn't show up when I try to change the source.</p>
  
  <pre><code>button1_Click(object sender, eventArgs e)
  {
    changeSource(imageSeven);
  }
  
  private void changeSource(string imageIndx)
  { 
    imageIndx.Source = new BitmapImage(new Uri(@"\myfolder\folder1\changed image"));
  }
  </code></pre>