Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set FontAttributes within XAML to both Bold and Italic?

In Xamarin.Forms, how do I set FontAttributes within XAML to both Bold and Italic?

Example:

  <Style TargetType="Label">
    <Setter Property="FontAttributes" Value="Bold" />
    <Setter Property="FontAttributes" Value="Italic" />
  </Style>
like image 384
Scott Nimrod Avatar asked Jul 14 '15 09:07

Scott Nimrod


People also ask

How do I use font awesome in xamarin forms?

Add resource filesAdd the otf files inside the Assets folder of the android project and make sure the otf file build action is set to Android Assets. Add the ots files inside Resources folder of the iOS project and make sure the build action is set to BundleResource.


1 Answers

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

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

like image 68
Stephane Delcroix Avatar answered Sep 22 '22 06:09

Stephane Delcroix