Application.Current.Resources.MergedDictionaries.Clear();
ResourceDictionary resource = (ResourceDictionary)Application.LoadComponent(
new Uri("/Dcet.Platform.Client.UI.WPF;component/Theme.xaml", UriKind.Relative));
Application.Current.Resources.MergedDictionaries.Add(resource);
以C#中使用以上代码即可
Theme.xaml 为主题文件名
Dcet.Platform.Client.UI.WPF 为当前的动态库或者可执行程序