有没有办法让标签内的单词以粗体显示?

Sam*_*tar 0 xamarin.ios xamarin xamarin.forms

我有这个 Xaml:

<StackLayout Spacing="0" Margin="20">
   <Label Text="I would like the word" />
   <Label Text="HERE"  />
   <Label Text="to be in a bold font and red color"  />
</StackLayout>
Run Code Online (Sandbox Code Playgroud)

这给出了:

I would like the word
HERE
to be in a bold font
Run Code Online (Sandbox Code Playgroud)

有什么方法可以组合这些标签,以便 HERE 一词以粗体和红色出现,并且所有词都出现在一行中?我要找的是这个:

I would like the word HERE to be in a bold font
Run Code Online (Sandbox Code Playgroud)

请注意,我正在使用 Xamarin.Forms 但我也标记了 Xamarin.iOS 因为我想知道这是否可以使用渲染器并想知道它是否可以在 iOS 中完成?

Sha*_*raj 5

FormattedText

<Label.FormattedText>
  <FormattedString>
     <Span Text="I would like the word " />
     <Span Text="HERE" ForegroundColor="Red" FontAttributes="Bold" />
     <Span Text="to be in a bold font" />
   </FormattedString>
</Label.FormattedText>
Run Code Online (Sandbox Code Playgroud)