Пример #1
0
        public static AppThemeData LoadDefault()
        {
            var appTheme = new AppThemeData();

            appTheme.LoadFromResourceDictionary(ApplicationThemeManager.Instance.AppThemes.First(x => x.Name == "BaseLight").ResourceDictionary);
            return(appTheme);
        }
Пример #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;
            }
        }
Пример #3
0
        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;
        }
Пример #4
0
 public static AppThemeData LoadDefault()
 {
     var appTheme = new AppThemeData();
     appTheme.LoadFromResourceDictionary(ApplicationThemeManager.Instance.AppThemes.First(x => x.Name == "BaseLight").ResourceDictionary);
     return appTheme;
 }