如何在XAML中将FontAttributes设置为Bold和Italic?

Sco*_*rod 9 xaml xamarin.forms

在Xamarin.Forms,我该如何设置FontAttributesXAML粗体斜体

例:

  <Style TargetType="Label">
    <Setter Property="FontAttributes" Value="Bold" />
    <Setter Property="FontAttributes" Value="Italic" />
  </Style>
Run Code Online (Sandbox Code Playgroud)

Ste*_*oix 15

<Style TargetType="Label">
  <Setter Property="FontAttributes" Value="Bold, Italic" />
</Style>
Run Code Online (Sandbox Code Playgroud)

FontAttributes 是一个Flag,因此您可以传递多个值.