Change default colors in palette

Oct 30, 2014 at 12:20 AM
Edited Oct 30, 2014 at 12:28 AM
I read the Documentation about "How to use a custom color palette", but I'm having problems with this.

My code is like this:

On MainPage.xaml:
<chart:DoughnutChart
                        ...
                       Palette="{StaticResource CustomColors}"
                        ... >

                        <chart:DoughnutChart.Series>
                        ...
                        </chart:DoughnutChart.Series>
</chart:DoughnutChart>
On Generic.xaml:
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:chart="clr-namespace:De.TorstenMandelkow.MetroChart">

    <chart:ResourceDictionaryCollection x:Key="CustomColors">
        <ResourceDictionary>
            <SolidColorBrush x:Key="Brush1" Color="#FF5B9BD5" />
        </ResourceDictionary>
        <ResourceDictionary>
            <SolidColorBrush x:Key="Brush2" Color="#FFED7D31" />
        </ResourceDictionary>
        <ResourceDictionary>
            <SolidColorBrush x:Key="Brush3" Color="#FFA5A5A5" />
        </ResourceDictionary>
        <ResourceDictionary>
            <SolidColorBrush x:Key="Brush4" Color="#FFFFC000" />
        </ResourceDictionary>
    </chart:ResourceDictionaryCollection>
</ResourceDictionary>
But "Palette="{StaticResource CustomColors}" is not recognized.
The phrase "The resource 'CustomColors' could not be resolver" appears.

Has anyone had this problem? There is another way to change the colors?