XAML - Value changed over a value converter for a Material Icon

AUU 1 Reputation point
2021-01-28T05:00:39.297+00:00

Hi there,

I am trying to add a Material character into a form using a converter based on a binding value.

When I use the hex desc directly it shows fine, if I use the converter, it is showing something weird.

61244-error.png

       **<Label Text="&#xe87C;" FontSize="14" FontFamily="Material" TextColor="blue"/>  
       <Label Text="{Binding AttType, Converter={StaticResource categoryToImageConverter}}" FontSize="14" FontFamily="Material" TextColor="red"/>**  

    **public object Convert(object value, Type targetType, object parameter, CultureInfo culture)  
    {  
        //return "ABCXX";  
        return "&#xe87C;";  
    }**  
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
{count} votes