Forum Cross Platform with Xamarin

Xamarin UWP : Picker displays class name when string.empty is selected

I have following code in Xamarin forms project.

   <StackLayout Orientation="Horizontal">
        <Picker x:Name="picker"
                Title="Select a monkey"
                <x:Array Type="{x:Type x:String}">
                    <x:String> </x:String>
                    <x:String>Capuchin Monkey</x:String>
                    <x:String>Blue Monkey</x:String>
                    <x:String>Squirrel Monkey</x:String>
                    <x:String>Golden Lion Tamarin</x:String>
                    <x:String>Howler Monkey</x:String>
                    <x:String>Japanese Macaque</x:String>

if you notice the 1st choice in picker is the empty string. when I run on Android I get proper value displayed. but when I run on windows platform and select the 1st option and the class name is displayed in the picker field.

the field displays: Xamarin.Forms.Picker

I would like to have this displayed as empty string than a class name.

Best Answer


Sign In or Register to comment.