private void StationIdentifier_CheckChanged(object sender, RoutedEventArgs e) { if (radStatName.IsChecked.Value == true) //if radiobutton for stationname is checked { cmbxStationStrChooser.Items.Clear(); //clear items in combobox foreach (string stationName in Guide.StationNameStringList()) //foreach loop { cmbxStationStrChooser.Items.Add(stationName); //add station names to the combobox } } else if (radStatCode.IsChecked.Value == true) //if radiobutton for stationcode is checked { cmbxStationStrChooser.Items.Clear(); //clear items in combobox foreach (string stationCode in Guide.StationCodeStringList()) //foreach loop { cmbxStationStrChooser.Items.Add(stationCode); //add station codes to the combobox } } }