private void Load() { for (int i = 0; i < 15; i++) { RaceVM newRace = CreateItem(i); Items.Dispatcher.Invoke(() => _collection.Add(newRace)); } }
private RaceVM CreateItem(int index) { RaceVM newRace = new RaceVM() { Race = (Race)index, MpeSettings = Mod.Model.Data.Mpe, RaceSettings = Mod.Model.Data.Races[index] }; return(newRace); }