Capital Font for Label in Xamarin Forms Style Xaml

Published

How can we set style for label in Xamarin forms to have all fonts in capital. For now I have style in App.xaml like the sample below.

<ResourceDictionary>
<Style x:Key="WelcomeLabelStyle" TargetType="Label">
<Setter Property="FontFamily" Value="Fira Sans Ultra Light" />
</Style>
</ResourceDictionary>

Source: Xamarin.ios Questions

Published
Categorised as Uncategorised Tagged , , , ,

Answers

A simple alternative is to use TextTransform property in the style:

<ResourceDictionary>
    <Style x:Key="WelcomeLabelStyle" TargetType="Label">
          <Setter Property="TextTransform" Value="Uppercase"/>
    </Style>
</ResourceDictionary>

PS:
Maybe at the time of the question post this property was not available.


Tessie Kessler

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq