title: WPF - Change button image source when clicks button
body: <p>I'm trying to change the image source when a click event has occurred. I can change the image in XAML, but not from code. I've tried getting the Image property from the Button, but that doesn't work.</p>
  
  <p>I am using Caliburn for the event call:</p>
  
  <pre><code>&lt;Button Content="Mark1" Height="30" Width="40" 
  cal:Message.Attach="[Event Click] = [Action SayHello($source, $this)]"&gt;
     &lt;Image Name="Mark1ButtonImage"  Source="image1.png" /&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>In C# code:</p>
  
  <pre><code>public void SayHello(object sender, object doodlesource)
  {
      var selectedButton = sender as Button;
      var selectedKrav = doodlesource as Doodle;
      if (selectedButton != null)
      {
         ///WHAT TO DO TO CHANGE? selectedButton.Image doesn't work?
      }
  }
  </code></pre>