private async Task LoadTotalCurrencies() { var exchangeRate = await exchangeRateService.GetTodayRates(ApiStrings.DefaultCurrency); List <string> totalCurrencyList = (from rate in exchangeRate.Rates select rate.Name).ToList(); totalCurrencyList.Add(exchangeRate.Base); Favorites_SelectFavorite_Picker.ItemsSource = totalCurrencyList; }
private async Task GetTodayRates() { var currencyName = string.Empty; if (string.IsNullOrEmpty(currentCurrency.Name)) { currencyName = ApiStrings.DefaultCurrency; } else { currencyName = currentCurrency.Name; } var exchangeRate = await exchangeRateService.GetTodayRates(currencyName); foreach (var rate in exchangeRate.Rates) { rate.ImageUri = imageService.GetImageUri(rate.Name); } BindingContext = exchangeRate; ExchangeRate_ListView.ItemsSource = exchangeRate.Rates; }