Hi
I want to display a text in the picker according to the value. Like this:
Razor Code:
<Picker ItemsSource="worldsSource" ItemDisplayBinding=@(e=> e==null?"All":"+"+e.ToString()) />
C# Code:
//WorldTypes is an enum
private List<WorldTypes?> worldsSource = new()
{
null,WorldTypes.OpenWorld,WorldTypes.Linear,WorldTypes.Mix
};
The result is correct in all values except the null one. It must appear as "All" text but it shows an empty text
Hi I want to display a text in the picker according to the value. Like this: Razor Code:
<Picker ItemsSource="worldsSource" ItemDisplayBinding=@(e=> e==null?"All":"+"+e.ToString()) />
C# Code:The result is correct in all values except the null one. It must appear as "All" text but it shows an empty text
Is there something wrong with my code?