感谢杰森的使用
FormattedText
属性。但由于它不支持文本绑定,所以我在
StackLayout
,以mirco字体大小显示的上标文本:
<StackLayout Orientation="Horizontal" Spacing="0">
<Label Text="{Binding Minutes}">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="Android" Value="fonts/chsans/MyFont-Bold.ttf#MyFont-Bold" />
</OnPlatform>
</Label.FontFamily>
</Label>
<Label Text="min" FontSize="Micro">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="Android" Value="fonts/chsans/MyFont-Regular.ttf#MyFont-Regular" />
</OnPlatform>
</Label.FontFamily>
</Label>
</StackLayout>