Hi all,
I am writing a WPF application which uses styles to visualize controls in the application. I use separate resource dictionaries. ControlTemplates.xaml, Animations.xaml and a folder named Colors including different resource dictionaries to change the control colors on the fly. I am using MergedDictionaries to load styles such that;
Quote:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Styles;component/Styles/Colors/BlueColors.xaml"/>
<ResourceDictionary Source="/Styles;component/Styles/Animations.xaml"/>
<ResourceDictionary Source="/Styles;component/Styles/ControlTemplates.xaml"/>
</ResourceDictionary.MergedDictionaries>
Then i get an exception when loading resources like;
"A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: Cannot find resource named '{BackgroundBrush}'. Resource names are case sensitive. Error at object 'System.Windows.Media.Animation.SplineColorKeyFram e' in markup file 'Styles;component/Styles/Animations.xaml' Line 81 Position 34."
When i add the BlueColors.xaml resource dictionary in the Animations.xaml file everything works well. I need to use those resource dictioaries in separate files because all resources except color resources are common throughout the application.
Any help would be greatly appreciated.