예제 #1
0
        // Initialize everything related to Theming.
        public static void InitializeThemeHelper()
        {
            try
            {
                var settingsManager = ServiceLocator.Default.ResolveType <ISettingsManager>();

                HandyControl.Themes.ThemeManager.Current.SetCurrentValue(HandyControl.Themes.ThemeManager.ApplicationThemeProperty, HandyControl.Themes.ApplicationTheme.Dark);
                var themeResources = new HandyControl.Themes.ThemeResources {
                    AccentColor = HandyControl.Tools.ResourceHelper.GetResource <Brush>("MahApps.Brushes.Accent3")
                };
                var themeSettings = new MaterialDarkThemeSettings
                {
                    PrimaryBackground = new SolidColorBrush(settingsManager.GetThemeAccent()),
                    BodyFontSize      = 11,
                    HeaderFontSize    = 14,
                    SubHeaderFontSize = 13,
                    TitleFontSize     = 13,
                    SubTitleFontSize  = 12,
                    BodyAltFontSize   = 11,
                    FontFamily        = new FontFamily("Segoe UI")
                };
                SfSkinManager.RegisterThemeSettings("MaterialDark", themeSettings);
                SfSkinManager.ApplyStylesOnApplication = true;
            }
            catch (Exception e)
            {
                StaticReferences.Logger.Error(e);
            }
        }
예제 #2
0
        public void InitializeThemeHelper()
        {
            HandyControl.Themes.ThemeManager.Current.SetCurrentValue(HandyControl.Themes.ThemeManager.ApplicationThemeProperty, HandyControl.Themes.ApplicationTheme.Dark);
            HandyControl.Themes.ThemeResources tr = new HandyControl.Themes.ThemeResources(); tr.AccentColor = HandyControl.Tools.ResourceHelper.GetResource <Brush>("MahApps.Brushes.Accent3");

            // Orc.Theming.ThemeManager.Current.SynchronizeTheme();
            // ThemeManager.Current.SyncTheme();
        }
예제 #3
0
 public static void InitializeThemeHelper()
 {
     HandyControl.Themes.ThemeManager.Current.SetCurrentValue(HandyControl.Themes.ThemeManager.ApplicationThemeProperty, HandyControl.Themes.ApplicationTheme.Dark);
     var tr = new HandyControl.Themes.ThemeResources
     {
         AccentColor = HandyControl.Tools.ResourceHelper.GetResource <Brush>("MahApps.Brushes.Accent3")
     };
 }