У меня есть проблема, связанная с привязкой в FormattedText в формах xamarin
см. ниже кодовую ссылку
<Label HeightRequest="40" FormattedText="{Binding CustomContent}" Style="{StaticResource SmallTextStyle}" TextColor="{StaticResource FadedTextColor}" HorizontalOptions="StartAndExpand" VerticalOptions="Center" LineBreakMode="TailTruncation"/>
ViewModel--
public class CustomerViewModel : BaseViewModel
{
private FormattedString _customContent;
public FormattedString CustomContent
{
get { return _customContent; }
set { SetProperty(ref _customContent, value); }
}
public CustomerViewModel()
{
CustomContent = new FormattedString
{
Spans =
{
new Span { Text = "Text1", FontSize=14 },
new Span { Text = "Test2 ", FontSize=12, },
new Span { Text = "Test3", FontSize=12, },
}
};
}
}
Не могли бы вы, ребята, предложить правильный ответ