Here is a small how-to solution to a very common question.
Suppose I have separated my client application to multiple projects, and each project contains his own WPF resource dictionary, how do I use it?
Bottom line, you need to merge your resource dictionary to the application main resource, let’s see how to do that.
private static void RegisterResources()
{
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Source = new Uri(
"pack://application:,,,/[ASSEMBLY NAME];Component/[SUBFOLDER IF ANY]/[DICTIONARY NAME].xaml");
Application.Current.Resources.MergedDictionaries.Add(dictionary);
}
Note: the strange Uri syntax, every [] is a place holder for you to put in your specific information.
I usually use this method somewhere in my module entry point. (If using prism, the class which implement IModule is a good candidate).
Ariel