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

Application resources onplatform

$
0
0

Hi,

I have following xaml code in my app.xaml file. But the onplatform section does not work.... please help?

<.Application.Resources>
        <.ResourceDictionary>
            <.OnPlatform x:Key="PlatformFont"
                  x:TypeArguments="x:String"
                  iOS="AvenirNextCondensed-Regular"
                  Android="sans-serif-condensed"
                  WinPhone="Segoe WP"/>

            <.Style TargetType="Button">
                <.Setter Property="BorderColor" Value="Transparent" />
                <.Setter Property="TextColor" Value="Black" />
                <.Setter Property="BackgroundColor" Value="Silver" />
                <.Setter Property="FontFamily" Value="{StaticResource PlatformFont}" />
            </.Style>

            <.Style TargetType="Label">
                <.Setter Property="FontFamily" Value="{StaticResource PlatformFont}" />
            </.Style>
        </.ResourceDictionary>
    </.Application.Resources>

Viewing all articles
Browse latest Browse all 58056

Trending Articles