I find sometime xamComboEditor has different items number between ItemsSource and Items. I can't provider the data which I bind to ItemsSource. The scenario is I bind 4 item to ItemsSource but the Items only has one empty item. When I set SelectIndex as 2, it crash. I use 11.2 version.
xaml code is:
<ig:XamComboEditor Name="PropertyUnitComboBox" Width="70" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=local:AFAMPropertyParameterControl},Path= PropertyUnits}" DisplayMemberPath="Name" Margin="10,0,0,0" IsEditable="True" AllowMultipleSelection="False" />
PropertyUnits is:
public IEnumerable PropertyUnits { get { return (IEnumerable)GetValue(PropertyUnitsProperty); } set { SetValue(PropertyUnitsProperty, value); } } public static readonly DependencyProperty PropertyUnitsProperty = DependencyProperty.Register("PropertyUnits", typeof(IEnumerable), typeof(AFAMPropertyParameterControl), new UIPropertyMetadata(null));