Posted 6 February 2018, 9:47 am EST
Xamarin.Forms
C1 version: v2.5.20173.241
Tested platforms: UWP
When using a list of strings as the ItemsSource to my C1ComboBox, setting the SelectedItem property throws a System.ArgumentOutOfRangeException. This seems to be related to the fact that I am using a list of strings as my data source. If I wrap those strings in some sort of other class, it works as expected.
private string str1 = "test2";
public void Setup()
{
var itemsSource = new List<string>()
{
"test1",
str1,
"test3",
};
TheComboBox.ItemsSource = itemsSource;
}
private void Button_OnClicked(object sender, EventArgs e)
{
TheComboBox.SelectedItem = str1;
}