public NurseConfigurationWindow(string username) { InitializeComponent(); // Initialise nurse _nurse = new Nurse(username); _rooms = _nurse.GetRooms(); // Get rooms in hospital and add to combobox cbRooms.Items.Clear(); _rooms.ForEach(room => { cbRooms.Items.Add(new ComboboxItem <Room>(room, item => { return(item.RoomName); })); }); cbRooms.SelectedIndex = 0; // Passively listen for available caretakers and update the list _ = Task.Run(() => UpdateCaretakerList()); }