Example #1
0
        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;
        }
Example #2
0
 public ViewModel()
 {
     repository = new Repository();
     Corona CoronaInDenmark = repository.GetCoronaTrackingForCountry("Denmark");
     //   CoronaInDenmark = new ObservableCollection.Single<Corona>(coronaInDenmark);
 }