You should take a look at this :
picker.SelectedIndexChanged += (sender, args) =>
{
if (picker.SelectedIndex == -1)
{
boxView.Color = Color.Default;
}
else
{
string colorName = picker.Items[picker.SelectedIndex];
boxView.Color = nameToColor[colorName];
}
};
Otherwise, in the new release of version 2.3.4, Xamarin Forms exists
Bindable picker
you can set ItemSource
<Picker ItemsSource="{Binding Countries}" />
and bind the SelectedIndex property
SelectedIndex="{Binding CountriesSelectedIndex}"