title: Defining a color in App.xaml and using as a static resource
body: <p>EDIT: Looks like this was related to the way I declared the color - using  hex value seems to bring it through fine.</p>
  <p>EDIT: This about referencing <strong>from</strong> the App.xaml file. The color itself works fine if declared as a local resource.</p>
  <p>I've created a colour:</p>
  <pre><code>&lt;SolidColorBrush x:Key=&quot;TestBlue&quot;&gt;
      &lt;SolidColorBrush.Color&gt;
          &lt;Color R=&quot;0&quot; G=&quot;86&quot; B=&quot;45&quot;/&gt;
      &lt;/SolidColorBrush.Color&gt;
  &lt;/SolidColorBrush&gt;
  </code></pre>
  <p>and placed it in a ResourceDictionary. I've then referenced it in a MergedDictionary:</p>
  <pre><code>&lt;Application.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;vm:ViewModelLocator x:Key=&quot;Locator&quot; d:IsDataSource=&quot;True&quot;/&gt;
              &lt;ResourceDictionary.MergedDictionaries&gt;
                  &lt;ResourceDictionary  Source=&quot;Colours.xaml&quot;/&gt;
                  &lt;ResourceDictionary  Source=&quot;View\Item\ItemResource.xaml&quot;/&gt;
              &lt;/ResourceDictionary.MergedDictionaries&gt;
          &lt;/ResourceDictionary&gt;
    &lt;/Application.Resources&gt;
  </code></pre>
  <p>When I apply it to the background of a Button as a StaticResource it doesn't apply:</p>
  <pre><code>Background=&quot;{StaticResource TestBlue}&quot; 
  </code></pre>
  <p>When I Snoop the control it declares the Background as some other value:
  <img src="https://i.stack.imgur.com/stbYf.png" alt="Background" /></p>
  <p>It also doesn't work if I make it an entry in the  itself (like the ViewModelLocator). It does work if I place it in the Window.Resources. Any ideas what's going on here?</p>