You can obtain a ResourceDictionary
instance from .xaml
file (not necessary included in your project) by calling XamlReader.Load
method and casting the resulting object afterwards. From that point it comes down to manipulating this dictionary in code behind. On application level you can call something like
Application.Current.Resources.MergedDictionaries.Clear();
Application.Current.Resources.MergedDictionaries.Add(dictionary);
where dictionary is the instance you have loaded. The same can be done for individual controls.