Under specific circumstances, when a user selects an item in a Picker, I need to move the selection to a different item in the same Picker (it sounds strange, but it makes perfect sense when you use it).
On Windows Phone the following code works fine, but on Android it is very fragile. I've had variants of this work on Android, but a minor tweak and it fails again, as if there is a timing issue. At the moment, it is failing again, by which I mean that the display is not updating to show the change of selection.
_myPicker.SelectedIndexChanged += (sender, args) =>
{
if (someConditionIsTrue)
_myPicker.SelectedIndex = aDifferentIndex;
}
How can I reliably change the SelectedIndex from within SelectedIndexChanged, so that the display reliably updates on Android, as well as Windows Phone and iOS?
Many thanks,
John H.