Can merged resource dictionaries access resources from App.xaml?
<p>Can <a href="https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/resourcedictionary-and-xaml-resource-references#merged-resource-dictionaries" rel="nofollow noreferrer">merged resource dictionaries</a> access resources from <code>App.xaml</code>? The goal is to split the style to have it more readable.</p>

<p>This is what I'm looking for, but doesn't work in that way:</p>

<p><em>App.xaml</em> in UWP project</p>

<pre><code>&lt;Application.Resources&gt;
    &lt;ResourceDictionary&gt;
        &lt;ResourceDictionary.MergedDictionaries&gt;
            &lt;ResourceDictionary Source="Styles\DefaultButtonStyle.xaml"/&gt;
        &lt;/ResourceDictionary.MergedDictionaries&gt;
    &lt;/ResourceDictionary&gt;

    &lt;!-- other custom styles, definitions, ThemeDictionaries, ... --&gt;
    &lt;Color x:Key="Primary"&gt;#dfdfdf&lt;/Color&gt;
&lt;/Application.Resources&gt;
</code></pre>

<p><em>DefaultButtonStyle.xaml</em></p>

<pre><code>&lt;ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AppName.UWP.Styles"&gt;

    &lt;!-- some definitions --&gt;
    &lt;Style TargetType="Button" x:Key="DefaultButtonStyle"&gt;
        &lt;!-- my styles --&gt;
        &lt;Setter Property="Background" Value="{StaticResource Primary}" /&gt;
    &lt;/Style&gt;
&lt;/ResourceDictionary&gt;
</code></pre>

<p>The app crashes with</p>

<blockquote>
  <p>Cannot find a Resource with the Name/Key Primary</p>
</blockquote>

<p>I could put everything in one big style.xaml, or copy the needed values in each xaml file, but aren't there other options? Could a merged dictionary include another merged dictionary? Or something like that?</p>