Xamarin Form FormattedText не привязывается для Android, работает нормально для iOS - PullRequest
0 голосов
/ 16 сентября 2018

У меня есть проблема, связанная с привязкой в ​​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, },
                    }
                };
}

}

Не могли бы вы, ребята, предложить правильный ответ

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...