Xamarin.Forms: How can I load ResourceDictionary from another file?
<p>I wrote following code, but XamlParseException has bean thrown. ("StaticResource not found for key CustomColor")</p>

<p>MyPage.xaml</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="XFApp11.MyPage"&gt;
    &lt;ContentPage.Resources&gt;
        &lt;ResourceDictionary&gt;
            &lt;ResourceDictionary.MergedDictionaries&gt;
                &lt;ResourceDictionary Source="CustomResource.xaml" /&gt;
            &lt;/ResourceDictionary.MergedDictionaries&gt; 
        &lt;/ResourceDictionary&gt;
    &lt;/ContentPage.Resources&gt;

    &lt;ContentPage.Content&gt;
        &lt;BoxView Color="{StaticResource CustomColor}" /&gt;
    &lt;/ContentPage.Content&gt;
&lt;/ContentPage&gt;
</code></pre>

<p>CustomResource.xaml (build action = EmbeddedResource)</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
                    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"&gt;
    &lt;Color x:Key="CustomColor"&gt;#004B86&lt;/Color&gt;
&lt;/ResourceDictionary&gt;
</code></pre>