private void CmbCurrentMunicipality_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBoxModel sel = new ComboBoxModel(); ComboBoxLogic comboboxLogic = new ComboBoxLogic(); sel = (ComboBoxModel)cmbCurrentMunicipality.SelectedItem; if (sel != null) { cmbCurrentCity.IsEnabled = true; cmbCity.ItemsSource = comboboxLogic.Cities(sel.Name); } }