I have a base styles files that contains all by base colors and base font settings. Then I have 2 other resource dictionaries that use that the initial resource.
I have it setup as follows:
<Application.Resources>
<ResourceDictionary>
<localization:LocalizationLocator x:Key="LocalizedStrings" />
<viewModels:ViewModelLocater x:Key="VmLocator" />
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="\Resources\Styles\BaseStyles.xaml" />
<ResourceDictionary Source="\Resources\Styles\FormInputStyles.xaml" />
<ResourceDictionary Source="\Resources\Styles\OtherControllsStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Then I get the following exception from FormInputStyles.xml
Cannot find a Resource with the Name/Key MyNewAccentColor [Line: 17 Position: 44]
Is there a way to load the BaseStyles.xaml before adding merged dictionaries?
(I know I could have them all in the same file but I would like my styles broken down so that I can have better code re-use)