public IngavePunt() { InitializeComponent(); using (Repos rep = new Repos()) { TempList = rep.Klassen(); foreach (Klas k in TempList) { Klassen.Add(k.Naam); } } using (Repos rep = new Repos()) { TempList1 = rep.Leerlingen(); foreach (Leerling l in TempList1) { Leerlingen.Add(l.Naam); } } using (Repos rep = new Repos()) { TempList2 = rep.Vakken(); foreach (Vak v in TempList2) { Vakken.Add(v.Naam); } } using (Repos rep = new Repos()) { TempList3 = rep.Testen(); foreach (Test t in TempList3) { Testen.Add(t.TestNaam); } } Cb1.ItemsSource = Klassen; Cb2.ItemsSource = Leerlingen; Cb3.ItemsSource = Vakken; Cb4.ItemsSource = Testen; }