302 lines
15 KiB
XML
302 lines
15 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Application xmlns="http://xamarin.com/schemas/2014/forms"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:converters="clr-namespace:eShopOnContainers.Core.Converters;assembly=eShopOnContainers.Core"
|
|
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
|
|
x:Class="eShopOnContainers.App">
|
|
<Application.Resources>
|
|
<ResourceDictionary>
|
|
|
|
<!-- COLORS -->
|
|
<Color x:Key="WhiteColor">#ffffff</Color>
|
|
<Color x:Key="BlackColor">#000000</Color>
|
|
<Color x:Key="BackgroundColor">#F4F6FA</Color>
|
|
<Color x:Key="AccentColor">#00857D</Color>
|
|
<Color x:Key="LightGreenColor">#83D01B</Color>
|
|
<Color x:Key="GreenColor">#00A69C</Color>
|
|
<Color x:Key="DarkGreenColor">#00857D</Color>
|
|
<Color x:Key="GrayColor">#e2e2e2</Color>
|
|
<Color x:Key="ErrorColor">#ff5252</Color>
|
|
<Color x:Key="TextColor">#757575</Color>
|
|
<Color x:Key="InverseTextColor">#FFFFFF</Color>
|
|
<Color x:Key="LightTextColor">#979797</Color>
|
|
<Color x:Key="iOSDefaultTintColor">#007aff</Color>
|
|
<Color x:Key="SeparatorLineColor">#CCCCCC</Color>
|
|
<Color x:Key="AndroidDefaultButtonClassBackgroundColor">#C9C9C9</Color>
|
|
<Color x:Key="iOSDefaultButtonClassBackgroundColor">Transparent</Color>
|
|
<Color x:Key="AndroidDefaultButtonClassBorderColor">Transparent</Color>
|
|
<Color x:Key="iOSDefaultButtonClassBorderColor">#007aff</Color>
|
|
<Color x:Key="AndroidDefaultButtonClassTextColor">#FFFFFF</Color>
|
|
<Color x:Key="iOSDefaultButtonClassTextColor">#007aff</Color>
|
|
<Color x:Key="AndroidEntryBackgroundColor">Transparent</Color>
|
|
<Color x:Key="iOSEntryBackgroundColor">#FFFFFF</Color>
|
|
<Color x:Key="AndroidDefaultAccentColorColor">#1FAECE</Color>
|
|
<Color x:Key="AndroidListViewBackgroundColor">Transparent</Color>
|
|
<Color x:Key="iOSListViewBackgroundColor">Transparent</Color>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="ActivityIndicatorColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSDefaultTintColor }" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="DefaultButtonClassBackgroundColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSDefaultButtonClassBackgroundColor }" />
|
|
<On Platform="Android" Value="{ StaticResource AndroidDefaultButtonClassBackgroundColor }" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="DefaultButtonClassBorderColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSDefaultButtonClassBorderColor }" />
|
|
<On Platform="Android" Value="{ StaticResource AndroidDefaultButtonClassBorderColor }" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="DefaultButtonClassTextColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSDefaultButtonClassTextColor }" />
|
|
<On Platform="Android" Value="{ StaticResource AndroidDefaultButtonClassTextColor }" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="EntryBackgroundColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSEntryBackgroundColor }" />
|
|
<On Platform="Android" Value="{ StaticResource AndroidEntryBackgroundColor }" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="Color"
|
|
x:Key="ThemeListViewBackgroundColor">
|
|
<On Platform="iOS" Value="{ StaticResource iOSListViewBackgroundColor }" />
|
|
<On Platform="Android" Value="{ StaticResource AndroidListViewBackgroundColor }" />
|
|
</OnPlatform>
|
|
|
|
<!-- SIZES -->
|
|
<OnPlatform x:TypeArguments="x:Double"
|
|
x:Key="BaseButtonBorderRadius">
|
|
<On Platform="iOS" Value="6" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="x:Double"
|
|
x:Key="BaseButtonBorderWidth">
|
|
<On Platform="iOS, Android" Value="0" />
|
|
</OnPlatform>
|
|
|
|
<!-- FONTS -->
|
|
<OnPlatform x:Key="MontserratRegular"
|
|
x:TypeArguments="x:String">
|
|
<On Platform="iOS" Value="Montserrat-Regular" />
|
|
<On Platform="Android" Value="Montserrat-Regular.ttf#Montserrat" />
|
|
<On Platform="UWP, WinRT, WinPhone" Value="Assets/Fonts/Montserrat-Regular.ttf#Montserrat" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="MontserratBold"
|
|
x:TypeArguments="x:String">
|
|
<On Platform="iOS" Value="Montserrat-Bold" />
|
|
<On Platform="Android" Value="Montserrat-Bold.ttf#Montserrat" />
|
|
<On Platform="UWP, WinRT, WinPhone" Value="Assets/Fonts/Montserrat-Bold.ttf#Montserrat" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="SourceSansProRegular"
|
|
x:TypeArguments="x:String">
|
|
<On Platform="iOS" Value="SourceSansPro-Regular" />
|
|
<On Platform="Android" Value="SourceSansPro-Regular.ttf#Source Sans Pro" />
|
|
<On Platform="UWP, WinRT, WinPhone" Value="Assets/Fonts/SourceSansPro-Regular.ttf#Source Sans Pro" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="x:Double"
|
|
x:Key="BaseButtonFontSize">
|
|
<On Platform="iOS" Value="18" />
|
|
<On Platform="Android" Value="16" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="x:Double"
|
|
x:Key="BaseFontSize">
|
|
<On Platform="iOS" Value="16" />
|
|
<On Platform="Android" Value="15" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="LittleSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="11" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="12" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="MidMediumSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="12" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="14" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="MediumSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="14" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="16" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="LargeSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="16" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="18" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="LargerSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="18" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="20" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="BigSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="20" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="24" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="ExtraBigSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="24" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="32" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:Key="HugeSize"
|
|
x:TypeArguments="x:Double">
|
|
<On Platform="iOS" Value="32" />
|
|
<On Platform="Android, UWP, WinRT, WinPhone" Value="48" />
|
|
</OnPlatform>
|
|
|
|
<OnPlatform x:TypeArguments="FontAttributes"
|
|
x:Key="BaseButtonFontAttributes">
|
|
<On Platform="iOS" Value="Bold" />
|
|
<On Platform="Android" Value="None" />
|
|
</OnPlatform>
|
|
|
|
<!-- CONVERTERS -->
|
|
<converters:CountToBoolConverter x:Key="CountToBoolConverter" />
|
|
<converters:DatetimeConverter x:Key="DatetimeConverter" />
|
|
<converters:ImageConverter x:Key="ImageConverter" />
|
|
<converters:ItemTappedEventArgsConverter x:Key="ItemTappedEventArgsConverter" />
|
|
<converters:InverseCountToBoolConverter x:Key="InverseCountToBoolConverter" />
|
|
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
|
|
<converters:ItemsToHeightConverter x:Key="ItemsToHeightConverter" />
|
|
<converters:ToUpperConverter x:Key="ToUpperConverter" />
|
|
|
|
<!-- EXPLICIT STYLES -->
|
|
<Style x:Key="ValidationErrorLabelStyle"
|
|
TargetType="{x:Type Label}">
|
|
<Setter Property="TextColor"
|
|
Value="{StaticResource ErrorColor}" />
|
|
<Setter Property="FontSize"
|
|
Value="{StaticResource LittleSize}" />
|
|
</Style>
|
|
|
|
<Style x:Key="EntryStyle"
|
|
TargetType="{x:Type Entry}">
|
|
<Setter Property="FontFamily"
|
|
Value="{StaticResource MontserratRegular}" />
|
|
<Setter Property="TextColor"
|
|
Value="{StaticResource BlackColor}" />
|
|
<Setter Property="PlaceholderColor"
|
|
Value="{StaticResource BlackColor}" />
|
|
<Setter Property="FontSize"
|
|
Value="{StaticResource LargeSize}" />
|
|
<Setter Property="HorizontalOptions"
|
|
Value="FillAndExpand" />
|
|
<Setter Property="FontAttributes"
|
|
Value="Bold" />
|
|
<Setter Property="BackgroundColor"
|
|
Value="Transparent" />
|
|
<Setter Property="Opacity"
|
|
Value="0.6" />
|
|
<Setter Property="behaviors:LineColorBehavior.ApplyLineColor"
|
|
Value="True" />
|
|
<Setter Property="behaviors:LineColorBehavior.LineColor"
|
|
Value="{StaticResource BlackColor}" />
|
|
<Style.Triggers>
|
|
<Trigger TargetType="Entry"
|
|
Property="IsFocused"
|
|
Value="True">
|
|
<Setter Property="Opacity" Value="1" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="UwpEntryStyle"
|
|
TargetType="{x:Type Entry}">
|
|
<Setter Property="FontFamily"
|
|
Value="{StaticResource MontserratRegular}" />
|
|
<Setter Property="TextColor"
|
|
Value="{StaticResource BlackColor}" />
|
|
<Setter Property="PlaceholderColor"
|
|
Value="{StaticResource BlackColor}" />
|
|
<Setter Property="FontSize"
|
|
Value="{StaticResource LargeSize}" />
|
|
<Setter Property="HorizontalOptions"
|
|
Value="FillAndExpand" />
|
|
<Setter Property="FontAttributes"
|
|
Value="Bold" />
|
|
<Setter Property="BackgroundColor"
|
|
Value="Transparent" />
|
|
<Setter Property="Opacity"
|
|
Value="0.6" />
|
|
<Setter Property="behaviors:LineColorBehavior.ApplyLineColor"
|
|
Value="True" />
|
|
<Setter Property="behaviors:LineColorBehavior.LineColor"
|
|
Value="Gray" />
|
|
<Style.Triggers>
|
|
<Trigger TargetType="Entry"
|
|
Property="IsFocused"
|
|
Value="True">
|
|
<Setter Property="Opacity" Value="1" />
|
|
<Setter Property="behaviors:LineColorBehavior.LineColor"
|
|
Value="{StaticResource GreenColor}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- IMPLICIT STYLES -->
|
|
<Style TargetType="Button" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="FontSize" Value="{ StaticResource BaseButtonFontSize }" />
|
|
<Setter Property="FontAttributes" Value="{ StaticResource BaseButtonFontAttributes }" />
|
|
<Setter Property="BorderRadius" Value="{ StaticResource BaseButtonBorderRadius }" />
|
|
<Setter Property="BorderWidth" Value="{ StaticResource BaseButtonBorderWidth }" />
|
|
<Setter Property="BackgroundColor" Value="{ StaticResource DefaultButtonClassBackgroundColor }" />
|
|
<Setter Property="BorderColor" Value="{ StaticResource DefaultButtonClassBorderColor }" />
|
|
<Setter Property="TextColor" Value="{ StaticResource DefaultButtonClassTextColor }" />
|
|
</Style>
|
|
|
|
<Style TargetType="Label" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="FontSize" Value="{ StaticResource BaseFontSize }" />
|
|
</Style>
|
|
|
|
<Style TargetType="Entry" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="TextColor" Value="{ StaticResource TextColor }" />
|
|
<Setter Property="PlaceholderColor" Value="{ StaticResource LightTextColor }" />
|
|
<Setter Property="BackgroundColor" Value="{ StaticResource EntryBackgroundColor }" />
|
|
</Style>
|
|
|
|
<Style TargetType="ImageCell" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" />
|
|
<Setter Property="DetailColor" Value="{ StaticResource AccentColor }" />
|
|
</Style>
|
|
|
|
<Style TargetType="TextCell" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" />
|
|
<Setter Property="DetailColor" Value="{ StaticResource AccentColor }" />
|
|
</Style>
|
|
|
|
<Style TargetType="ListView" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="BackgroundColor" Value="{ StaticResource ThemeListViewBackgroundColor }" />
|
|
<Setter Property="SeparatorColor" Value="{ StaticResource SeparatorLineColor }" />
|
|
<Setter Property="SeparatorVisibility" Value="Default" />
|
|
</Style>
|
|
|
|
<Style TargetType="ActivityIndicator" ApplyToDerivedTypes="True" CanCascade="True">
|
|
<Setter Property="Color" Value="{ StaticResource ActivityIndicatorColor }" />
|
|
</Style>
|
|
|
|
<Style TargetType="NavigationPage">
|
|
<Setter Property="BarBackgroundColor" Value="{StaticResource GreenColor}"/>
|
|
<Setter Property="BarTextColor" Value="{StaticResource WhiteColor}"/>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application> |