void LoadMore() { FlightsToDisplay.AddRange( Flights.Skip(batchSize * currentFlightIndex).Take(batchSize) ); currentFlightIndex += batchSize; }
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}"); }