I have a situation where I need to display a picker control in Xamarin like the following way.
Where it will display the country Flag and Country code side by side. And the selected country code should display as the background image of the Picker control. (As in the image)
I have just started with Xamarin
and found that Picker doesn't have ItemSource
property like WPF XAML and it doesn't support DataTemplate
too.
Using a listView
I can achieve this but ListView
Control and Picker controls usability are different.
Can anybody guide me how can I achieve this feature in Picker in Xamarin-XAML
?
Picker.Items
is anIList<string>
so I think you can't do that, because it's made to hold strings only. See: https://developer.xamarin.com/api/property/Xamarin.Forms.Picker.Items/However you can make another page and on that page place a
ListView
so that the use can set the language there.