Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Setting FontSize in style

$
0
0

I'm in the process of porting over my app fonts and styling to use Styles in XF 1.3 but I'm running into issues with setting the FontSize specifically. It seems like no matter what I do or how I try to set the FontSize property, it is always defaulting to 17. I'm confused because everything else is coming through - the FontFamily is being set correctly as well as the TextColor. It doesn't seem like I'm doing anything weird here. Is this a bug or perhaps I'm missing something?

<Style TargetType="Label" x:Key="DiscountedPriceTextStyle">
    <Setter Property="FontSize" Value="18" />
    <Setter Property="FontFamily">
        <OnPlatform x:TypeArguments="sys:String">
            <OnPlatform.iOS>HelveticaNeue-Medium</OnPlatform.iOS>
            <OnPlatform.Android>Roboto-Medium.ttf</OnPlatform.Android>
        </OnPlatform>
    </Setter>
    <Setter Property="TextColor" Value="{x:Static mobile:Constants.DiscountedPriceTextColor}" />
</Style>

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>