Hi everyone
I am having a trouble that I have no idea why, could you guys help out?
Apparently, my text label does not display the text with the break line accordingly from the webservice. I thought it might be the binding issue, so I wrote a converter:
public class LineBreakConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string result = (string)value;
return result.Replace("%0D", Environment.NewLine);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
var myLbale= new Label { TextColor = Color.Black };
myLbale.SetBinding(Label.TextProperty, VisitItemViewModel.DescriptionPropertyName, converter: new LineBreakConverter());
But it does not work on Android, it works on iOS by the way.
Is this Xamarin form problem or my code problem?
Please help