title: Windows Phone 7 - dynamically set button background color from Hex?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10532056/change-custom-color-for-rectangle-fill-or-grid-background">Change custom color for Rectangle.Fill or Grid.Background</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to dynamically set a button background color from Hex in Windows Phone 7.</p>
  
  <pre><code>    SolidColorBrush myBrush = new SolidColorBrush();
      myBrush.Color = ColorTranslator.FromHtml("#123456");
      pbMood.Background = myBrush;
  </code></pre>
  
  <p>ColorTranslator seems to not be available.  That line gives a compiler error that it isn't found.</p>
  
  <p>Am I looking in the wrong place (a different namespace?), or is there another way to do this from code?</p>