title: Set control Background color using Dynamic Resource in WPF?
body: <p>This is my XAML</p>
  
  <pre><code>&lt;Grid.Resources&gt;
              &lt;SolidColorBrush x:Key="DynamicBG"/&gt;
  &lt;/Grid.Resources&gt;
  &lt;Label name="MyLabel" Content="Hello" Background="{DynamicResource DynamicBG} /&gt;
  </code></pre>
  
  <p>So I have two questions:</p>
  
  <p><strong>Q1:</strong> How do I go about setting the <code>DynamicBG</code> key value to <strong>Red</strong> in my code now? (When the window loads, I'd like to set it to red)</p>
  
  <p><strong>Q2:</strong>  Is this how dynamic resources are supposed to be used?</p>
  
  <p>Thank you</p>