Exemple #1
0
 void LoadMore()
 {
     FlightsToDisplay.AddRange(
         Flights.Skip(batchSize * currentFlightIndex).Take(batchSize)
         );
     currentFlightIndex += batchSize;
 }
Exemple #2
0
        async void LoadMore()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            await Task.Delay(1000);// fake delay to see the activity

            FlightsToDisplay.AddRange(
                Flights.Skip(batchSize * currentFlightIndex).Take(batchSize)
                );
            currentFlightIndex += batchSize;


            IsBusy = false;

            Debug.WriteLine($"You now have: {FlightsToDisplay.Count}");
        }