public SettingsPageViewModel()
        {
            ThemeSelectCommand    = new ParameterizedRelayCommand((parameter) => ThemeChange(parameter));
            LanguageSelectCommand = new ParameterizedRelayCommand((parameter) => LanguageChange(parameter));

            /*ThemeResourcesDictionary dict = (ThemeResourcesDictionary)Application.Current.Resources.MergedDictionaries.Where(k
             *  => k is ThemeResourcesDictionary).FirstOrDefault();*/

            foreach (AppTheme theme in (AppTheme[])Enum.GetValues(typeof(AppTheme)))
            {
                ThemeButtons.Add(new ThemeButtonModel(theme.ToString(), new SolidColorBrush(Color.FromRgb(100, 0, 0)), theme));
            }

            foreach (AppLanguage lang in (AppLanguage[])Enum.GetValues(typeof(AppLanguage)))
            {
                LanguageButtons.Add(new LanguageButtonModel(lang.ToString(), lang));
            }
        }
Пример #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public LoginViewModel()
 {
     // Create commands
     LoginCommand    = new ParameterizedRelayCommand(async(parameter) => await LoginAsync(parameter));
     RegisterCommand = new RelayCommand(async() => await RegisterAsync());
 }