Last active
January 30, 2018 23:22
-
-
Save juucustodio/c29fc8c8e124dfbb82c19ac79427cdcb to your computer and use it in GitHub Desktop.
Example of Global Styles in Xamarin.Forms applications - http://julianocustodio.com/global-styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<Application xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="DemoTimeLine.App"> | |
<Application.Resources> | |
<ResourceDictionary> | |
<!--Colors--> | |
<Color x:Key="ColorText">#3030E8</Color> | |
<Color x:Key="ColorButton">#20E82A</Color> | |
<!--Font Families--> | |
<OnPlatform x:TypeArguments="x:String" x:Key="RegularFontFamily"> | |
<On Platform="Android">sans-serif</On> | |
<On Platform="iOS">HelveticaNeue</On> | |
</OnPlatform> | |
<OnPlatform x:TypeArguments="x:String" x:Key="MediumFontFamily"> | |
<On Platform="Android">sans-serif-medium</On> | |
<On Platform="iOS">HelveticaNeue-Medium</On> | |
</OnPlatform> | |
<!--Styles--> | |
<Style x:Key="TitleStyle" TargetType="Label"> | |
<Setter Property="TextColor" Value="{StaticResource ColorText}" /> | |
<Setter Property="Font" Value="{StaticResource MediumFontFamily}" /> | |
</Style> | |
<Style x:Key="ButtonStyle" TargetType="Button"> | |
<Setter Property="TextColor" Value="{StaticResource ColorText}" /> | |
<Setter Property="Font" Value="{StaticResource RegularFontFamily}" /> | |
<Setter Property="BackgroundColor" Value="{StaticResource ColorButton}"/> | |
</Style> | |
</ResourceDictionary> | |
</Application.Resources> | |
</Application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment