title: How to change image source when view model property changes
body: <p>I'm building a WP8 application with MVVM Light and I encountered a silly problem I can't find and easy solution for.</p>
  
  <p>In the XAML page I have the following:</p>
  
  <pre><code>        &lt;Button Command="{Binding PlayCommand}" &gt;
              &lt;Image Source="Images/play.png"/&gt;
          &lt;/Button&gt;
  </code></pre>
  
  <p>When PlayCommand is executed, I change the value of <em>IsPlaying</em> property in the ViewModel to true. 
  Now, I would want the XAML page to react to the change of <em>IsPlaying</em> and change the source of the Image to "Images/pause.png". In WPF I could do it with DataTriggers (also not convenient), but it doesn't seem to work in WP8. Of cource I could just bind the Image Source to the ViewModel like this, but that beats the entire purpose of MVVM.</p>
  
  <pre><code>    &lt;Button Command="{Binding PlayCommand}" &gt;
          &lt;Image Source="{Binding PlayButtonImage}"/&gt;
      &lt;/Button&gt;
  </code></pre>
  
  <p>I know that there are complex solutions (for example, attached properties, behaviors, etc...), but I figure that there must be a simple one...</p>