title: WP7]Dynamic Color for theme awareness OR How to define a dynamic value for a property in a custom resource in App.xaml?
body: <p>I'm making an app for windows phone 7 (using Visual Studio 2010 Express for Windows Phone RTM), and i'm having some problems regarding theme (light/dark) awareness especially with colors.</p>
  
  <p>Basically i want to do the same thing that the phone does internally when using the staticresource colors/brushes.
  For example, if i declare:</p>
  
  <pre><code>&lt;Border Background="{StaticResource PhoneBackgroundBrush}" /&gt;
  </code></pre>
  
  <p>The Border will have a black background with the Dark Theme and White with the Light one.
  So, i want to have a resource ... let's say MyBackgroundBrush, and will be used like:</p>
  
  <pre><code>&lt;Border Background="{StaticResource MyBackgroundBrush}" /&gt;
  </code></pre>
  
  <p>And, it will have, maybe blue for the Dark theme, and red for the light.</p>
  
  <p>So my question is, how can i define such resource and behavior?</p>