title: Change background color of button in silverlight 5 in code behind
body: <p>I would like to change the background color of a button when I click on it. To make the button go from Red to Green to Red, etc...</p>
  
  <p>However, when I click the background color doesn't change.</p>
  
  <p>Here is what I have tried : </p>
  
  <pre><code>button4.Background.SetValue(BackgroundProperty,new SolidColorBrush(Colors.Red)); -&gt; catastrophic error
  
  button4.SetValue(BackgroundProperty,new SolidColorBrush(Colors.Red)); -&gt; nothing
  
  button4.Background = new SolidColorBrush(Colors.Red); -&gt; nothing
  </code></pre>
  
  <p>3rd solution seems the most revelant but doesn't work.</p>