WPF Combobox selectedindex binding
WPF Combobox selectedindex binding I have difficulties binding the selectedindex of a combobox to an object. This is my code: (Part of) CustomerClass public class Customer : INotifyPropertyChanged { public int CountryCode { get { return _CountryCode; } set { _CountryCode = value; NotifyPropertyChanged(); } } } 2a. (Part of) CustomListItem <ComboBox x:Name="cboCountryCode" Grid.Column="5" ItemsSource="{Binding}" DisplayMemberPath="LongName" SelectedIndex="{Binding CountryCode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/> 2b. (Part of) CustomListItem public partial class CustomerListItem : UserControl { public CustomerListItem() { InitializeComponent(); ObservableCollection<CountryCode> Liste = CountryCodes.Instance.List; cboCountryCode.DataContext = Liste; } (Part of) MainPage <ItemsControl Name="itcCustomers...