private void SetTheme(ResourceDictionary resourceDictionary, bool invokeOnThemeChanged) { var themeResourceDictionary = resourceDictionary as IThemeResourceDictionary; if (themeResourceDictionary == null) { throw new Exception("Invalid resource dictionary type"); } var mergedDictionaries = Application.Current.Resources.MergedDictionaries; if (mergedDictionaries != null) { CurrentTheme = themeResourceDictionary; platformThemeManager.SetTheme(themeResourceDictionary); ReplaceThemeResourceDictionaries(mergedDictionaries, resourceDictionary); if (invokeOnThemeChanged) { OnThemeChanged(themeResourceDictionary); } } }
public void SetTheme(IThemeResourceDictionary themeResourceDictionary) { SetStatusBar(themeResourceDictionary.ThemeColorExtractor.SecondaryColor); }