How to set FontAttributes in XAML both bold and italic?

In Xamarin.Forms, how to set FontAttributes inside XAML both Bold and Italic ?

Example:

  <Style TargetType="Label"> <Setter Property="FontAttributes" Value="Bold" /> <Setter Property="FontAttributes" Value="Italic" /> </Style> 
+6
source share
2 answers
 <Style TargetType="Label"> <Setter Property="FontAttributes" Value="Bold, Italic" /> </Style> 

FontAttributes is a flag, so you can pass multiple values.

+10
source

Just use commas to separate them in the value field.

 <Style TargetType="Label"> <Setter Property="FontAttributes" Value="Bold, Italic"/> </Style> 

Be sure to check out http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/fonts/

+1
source

All Articles