public SettingsPageViewModel(IResourceScope scope, ISettingsService settings) : base(scope) { _settings = settings; var swatches = new SwatchesProvider().Swatches.ToArray(); MainHues = swatches.Select(x => x.ExemplarHue?.Color).Where(x => x != null).Select(x => x.Value); AccentHues = swatches.Select(x => x.AccentExemplarHue?.Color).Where(x => x != null).Select(x => x.Value); _settings.PropertyChanged += SettingsPropertyChanged; }
static SearchCriterionViewModel() { var swatches = new SwatchesProvider().Swatches.ToList(); AvailableColors = swatches.Select(sw => { var hues = sw.PrimaryHues.ToArray(); return(new[] { hues[1], hues[2], hues[3], hues[5] }); }).SelectMany(h => h).ToArray(); }