예제 #1
0
 public static string GetMahAppsBaseColorScheme(this BaseTheme baseTheme)
 {
     return(baseTheme switch
     {
         BaseTheme.Light => ThemeManager.BaseColorLightConst,
         BaseTheme.Dark => ThemeManager.BaseColorDarkConst,
         BaseTheme.Inherit => Theme.GetSystemTheme() switch
         {
             BaseTheme.Dark => ThemeManager.BaseColorDarkConst,
             _ => ThemeManager.BaseColorLightConst
         },
예제 #2
0
 public static IBaseTheme GetBaseTheme(this BaseTheme baseTheme)
 {
     return(baseTheme switch
     {
         BaseTheme.Dark => Theme.Dark,
         BaseTheme.Light => Theme.Light,
         BaseTheme.Inherit => Theme.GetSystemTheme() switch
         {
             BaseTheme.Dark => Theme.Dark,
             _ => Theme.Light
         },
        public static IBaseTheme GetBaseTheme(this BaseTheme baseTheme)
        {
            switch (baseTheme)
            {
            case BaseTheme.Dark: return(Theme.Dark);

            case BaseTheme.Light: return(Theme.Light);

            case BaseTheme.Inherit: return(Theme.GetSystemTheme() switch
                {
                    BaseTheme.Dark => Theme.Dark,
                    _ => Theme.Light
                });