Below we have an example of how to use the formatted text inside the XAML file.
<Label x:Name="MyLabel">
<Label.FormattedText>
<FormattedString>
<Span Text="Hello " FontAttributes="Bold" ForegroundColor="Red" BackgroundColor="Yellow" />
<Span Text="World" FontAttributes="Italic,Bold" ForegroundColor="White" BackgroundColor="Blue" FontSize="Large" />
</FormattedString>
</Label.FormattedText>
</Label>