title: Changing Image Source property when Button is clicked
body: <p>I have added an image(image1) in my Xaml Editor, changed the source property to Source="/WpfApplication9;component/Images/a.png"</p>
  
  <p>I have a button,
  I want is, if I Clicked that button I want my image1 to change its source.
  I have used this code but when i clicked the button the image1 that has the "a.png" became nothing, or  doesn't show something.</p>
  
  <p>this is my code</p>
  
  <pre><code> private void button1_Click(object sender, RoutedEventArgs e)
   {
      image1.Source = (System.Windows.Media.ImageSource)this.Resources["/Resources/a.png"]; 
   }
  </code></pre>
  
  <p>this is my xaml </p>
  
  <pre><code>&lt;Image Height="150" HorizontalAlignment="Left" Margin="153,56,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="200" Source="/WpfApplication9;component/Images/a.png" /&gt;
  </code></pre>