title: Animating text color
body: <p>I need to animate the text color of a custom control between two colors, which are read from two <code>Brush</code> properties of the custom control. My resources look like this:</p>
  
  <pre><code>&lt;SolidColorBrush x:Key="TextBrush"&gt;{TemplateBinding Foreground}&lt;/SolidColorBrush&gt;
  &lt;SolidColorBrush x:Key="AltTextBrush"&gt;{TemplateBinding ForegroundAlt}&lt;/SolidColorBrush&gt;
  </code></pre>
  
  <p>Right now, I am trying to animate using a ColorAnimation:</p>
  
  <pre><code>&lt;ColorAnimation Storyboard.TargetName="MyControlText" Storyboard.TargetProperty="Foreground" To="{StaticResource AltTextBrush}" Duration="00:00:00.3000000" /&gt;
  </code></pre>
  
  <p>The ColorAnimation seems to want a <code>Color</code> object, rather than the <code>Brush</code> I am trying to pass. I think I can write an <code>IValueConverter</code> to get the color from the brush, but before I do that, I want to see if there is a simpler way to do the job. Here are my questions:</p>
  
  <p>-- Is there a simple way to animate between two brush resources, or do I need to extract the color for animation? </p>
  
  <p>-- If I need to extract the colors, is an IValueConverter best practice? </p>
  
  <p>-- And finally, amI headed down the right road, or is there a simpler solution to this problem? </p>
  
  <p>Thanks for your help.</p>