public MainViewModel() { countries = countryRepository.GetCountries(); CurrentCountry = countries[index]; NextButtonPressed(); PrevButtonPressed(); }
public MainViewModel() { CountryRepository countryRepository = new CountryRepository(); listOfCountries = countryRepository.GetCountries(); CurrentCountry = listOfCountries[0]; NextCountryCommand = new Command(nextButtonPressed); PreviousCountryCommand = new Command(previousButtonPressed); }