public MainPage() { InitializeComponent(); // Create Repository Repository repository = new Repository(); // Create object Corona CoronaChosenCountry = repository.GetCoronaTrackingForCountry("Denmark"); // Assign binding values Cases.BindingContext = CoronaChosenCountry; TodayCases.BindingContext = CoronaChosenCountry; Deaths.BindingContext = CoronaChosenCountry; TodayDeaths.BindingContext = CoronaChosenCountry; Recovered.BindingContext = CoronaChosenCountry; Critical.BindingContext = CoronaChosenCountry; }
public ViewModel() { repository = new Repository(); Corona CoronaInDenmark = repository.GetCoronaTrackingForCountry("Denmark"); // CoronaInDenmark = new ObservableCollection.Single<Corona>(coronaInDenmark); }