Exemple #1
0
        public static AccentColorData LoadDefault()
        {
            var accentColor = new AccentColorData();

            accentColor.LoadFromResourceDictionary(ApplicationThemeManager.Instance.AccentColors.First(x => x.Name == "Cyan").ResourceDictionary);
            return(accentColor);
        }
Exemple #2
0
        public PreviewData(AccentColorData accentColor, AppThemeData appTheme)
        {
            AccentColorData = accentColor;
            AppThemeData = appTheme;
            foreach (var themeSetting in AccentColorData.ThemeSettings)
            {
                themeSetting.ValueChanged += themeSetting_ValueChanged;
            }

            foreach (var themeSetting in AppThemeData.ThemeSettings)
            {
                themeSetting.ValueChanged += themeSetting_ValueChanged;
            }
        }
        private void LoadTheme(AccentColorData accentColor, AppThemeData appTheme, bool editAccentColor)
        {
            CurrentTitle = editAccentColor
                ? Application.Current.Resources["AccentColorString"].ToString()
                : Application.Current.Resources["AppTheme"].ToString();

            var themeToEdit = editAccentColor ? (DataThemeBase) accentColor : appTheme;
            CurrentElement = themeToEdit;
            CurrentView = new ThemePage();
            var previewData = new PreviewData(accentColor, appTheme) { FrameworkElement = PreviewControl };
            PreviewData = previewData;
            PreviewControl = new LivePreview();
            previewData.FrameworkElement = PreviewControl;
            previewData.Refresh();
            CanGoBack = true;
        }
Exemple #4
0
 public static AccentColorData LoadDefault()
 {
     var accentColor = new AccentColorData();
     accentColor.LoadFromResourceDictionary(ApplicationThemeManager.Instance.AccentColors.First(x => x.Name == "Cyan").ResourceDictionary);
     return accentColor;
 }