private void AppendNewResourceDictionary(string sourcePath) { var resourceDictionary = _resourceDictionaryFactory.CreateEmpty(); resourceDictionary.Source = new Uri(sourcePath); Application.Current.Resources.MergedDictionaries.Add(resourceDictionary); }
public void Initialize(Assembly rootAssembly) { var resourceDictionary = _resourceDictionaryFactory.CreateEmpty(); _viewViewModelMapFactory .CreateAll(rootAssembly) .ForEach(map => AddDataTemplate(resourceDictionary, map)); Application.Current.Resources.MergedDictionaries.Add(resourceDictionary); }
public void Initialize(Assembly rootAssembly) { var resourceDictionary = _resourceDictionaryFactory.CreateEmpty(); var maps = _viewViewModelMapFactory.CreateAllMaps(rootAssembly); foreach (var map in maps) { ApplyDataTemplate(resourceDictionary, map); } Application.Current.Resources.MergedDictionaries.Add(resourceDictionary); }