You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Is there something wrong with my code?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: