Exemple #1
0
        public static async Task SetTheme(Framework.Themes.Theme theme)
        {
            if (theme == Framework.Themes.Theme.Light)
            {
                if (Application.Current.Properties.ContainsKey(Key_Theme))
                {
                    Application.Current.Properties.Remove(Key_Theme);
                    await Application.Current.SavePropertiesAsync();
                }
                return;
            }

            Application.Current.Properties[Key_Theme] = theme.ToString();
            await Application.Current.SavePropertiesAsync();
        }