public virtual LibraryTheme GenerateRuntimeLibraryTheme(LibraryThemeProvider libraryThemeProvider, Dictionary <string, string> values, RuntimeThemeColorValues runtimeThemeColorValues, string themeTemplateContent, string themeName, string themeDisplayName, ThemeGenerator.ThemeGeneratorBaseColorScheme baseColorScheme, ThemeGenerator.ThemeGeneratorColorScheme colorScheme, ThemeGenerator.ThemeGeneratorParameters generatorParameters)
        {
            values.Add("ThemeGenerator.Colors.PrimaryAccentColor", runtimeThemeColorValues.PrimaryAccentColor.ToString());
            values.Add("ThemeGenerator.Colors.AccentBaseColor", runtimeThemeColorValues.AccentBaseColor.ToString());
            values.Add("ThemeGenerator.Colors.AccentColor80", runtimeThemeColorValues.AccentColor80.ToString());
            values.Add("ThemeGenerator.Colors.AccentColor60", runtimeThemeColorValues.AccentColor60.ToString());
            values.Add("ThemeGenerator.Colors.AccentColor40", runtimeThemeColorValues.AccentColor40.ToString());
            values.Add("ThemeGenerator.Colors.AccentColor20", runtimeThemeColorValues.AccentColor20.ToString());

            values.Add("ThemeGenerator.Colors.HighlightColor", runtimeThemeColorValues.HighlightColor.ToString());
            values.Add("ThemeGenerator.Colors.IdealForegroundColor", runtimeThemeColorValues.IdealForegroundColor.ToString());

            libraryThemeProvider.FillColorSchemeValues(values, runtimeThemeColorValues);

            var xamlContent = ThemeGenerator.Current.GenerateColorSchemeFileContent(themeTemplateContent !, themeName, themeDisplayName, baseColorScheme.Name, colorScheme.Name, colorScheme.Name, runtimeThemeColorValues.Options.IsHighContrast, colorScheme.Values, baseColorScheme.Values, generatorParameters.DefaultValues);

            var preparedXamlContent = libraryThemeProvider.PrepareXamlContent(this, xamlContent, runtimeThemeColorValues);

            var resourceDictionary = (ResourceDictionary)XamlReader.Parse(preparedXamlContent);

            resourceDictionary.Add(Theme.ThemeIsRuntimeGeneratedKey, true);
            resourceDictionary[Theme.ThemeIsHighContrastKey]            = runtimeThemeColorValues.Options.IsHighContrast;
            resourceDictionary[LibraryTheme.RuntimeThemeColorValuesKey] = runtimeThemeColorValues;

            libraryThemeProvider.PrepareRuntimeThemeResourceDictionary(this, resourceDictionary, runtimeThemeColorValues);

            var runtimeLibraryTheme = libraryThemeProvider.CreateRuntimeLibraryTheme(resourceDictionary, runtimeThemeColorValues);

            return(runtimeLibraryTheme);
        }
 public abstract void FillColorSchemeValues(Dictionary <string, string> values, RuntimeThemeColorValues colorValues);
 public virtual void PrepareRuntimeThemeResourceDictionary(RuntimeThemeGenerator runtimeThemeGenerator, ResourceDictionary resourceDictionary, RuntimeThemeColorValues runtimeThemeColorValues)
 {
 }
 public LibraryTheme CreateRuntimeLibraryTheme(ResourceDictionary resourceDictionary, RuntimeThemeColorValues runtimeThemeColorValues)
 {
     return(new LibraryTheme(resourceDictionary, this));
 }
        public virtual string PrepareXamlContent(RuntimeThemeGenerator runtimeThemeGenerator, string xamlContent, RuntimeThemeColorValues runtimeThemeColorValues)
        {
            xamlContent = XamlThemeHelper.FixXamlReaderXmlNsIssue(xamlContent);

            return(xamlContent);
        }