title: Color transition in WPF
body: <p>I want to make a color transition of <code>Background</code> color of a WPF window.</p>
  
  <p><strong>How can I do this?</strong></p>
  
  <p>For example:</p>
  
  <pre><code>Brush i_color = Brushes.Red; //this is the initial color
  Brush f_color = Brushes.Blue; //this is the final color
  </code></pre>
  
  <p>When I click on <code>Button</code> button1</p>
  
  <pre><code>private void button1_Click(object sender, RoutedEventArgs e)
  {
      this.Background = f_color; //here the transition begins. I don't want to be quick. Maybe an interval of 4 seconds.
  }
  </code></pre>