|
1 | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <Application xmlns="http://xamarin.com/schemas/2014/forms" |
3 | | - xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 | | - xmlns:light="clr-namespace:Xamarin.Forms.Themes;assembly=Xamarin.Forms.Theme.Light" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
5 | 4 | xmlns:converters="clr-namespace:eShopOnContainers.Core.Converters;assembly=eShopOnContainers.Core" |
6 | 5 | xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core" |
7 | 6 | x:Class="eShopOnContainers.App"> |
8 | 7 | <Application.Resources> |
9 | | - <ResourceDictionary MergedWith="light:LightThemeResources"> |
| 8 | + <ResourceDictionary> |
10 | 9 |
|
11 | 10 | <!-- COLORS --> |
12 | 11 | <Color x:Key="WhiteColor">#ffffff</Color> |
|
18 | 17 | <Color x:Key="DarkGreenColor">#00857D</Color> |
19 | 18 | <Color x:Key="GrayColor">#e2e2e2</Color> |
20 | 19 | <Color x:Key="ErrorColor">#ff5252</Color> |
| 20 | + <Color x:Key="TextColor">#757575</Color> |
| 21 | + <Color x:Key="InverseTextColor">#FFFFFF</Color> |
| 22 | + <Color x:Key="LightTextColor">#979797</Color> |
| 23 | + <Color x:Key="iOSDefaultTintColor">#007aff</Color> |
| 24 | + <Color x:Key="SeparatorLineColor">#CCCCCC</Color> |
| 25 | + <Color x:Key="AndroidDefaultButtonClassBackgroundColor">#C9C9C9</Color> |
| 26 | + <Color x:Key="iOSDefaultButtonClassBackgroundColor">Transparent</Color> |
| 27 | + <Color x:Key="AndroidDefaultButtonClassBorderColor">Transparent</Color> |
| 28 | + <Color x:Key="iOSDefaultButtonClassBorderColor">#007aff</Color> |
| 29 | + <Color x:Key="AndroidDefaultButtonClassTextColor">#FFFFFF</Color> |
| 30 | + <Color x:Key="iOSDefaultButtonClassTextColor">#007aff</Color> |
| 31 | + <Color x:Key="AndroidEntryBackgroundColor">Transparent</Color> |
| 32 | + <Color x:Key="iOSEntryBackgroundColor">#FFFFFF</Color> |
| 33 | + <Color x:Key="AndroidDefaultAccentColorColor">#1FAECE</Color> |
| 34 | + <Color x:Key="AndroidListViewBackgroundColor">Transparent</Color> |
| 35 | + <Color x:Key="iOSListViewBackgroundColor">Transparent</Color> |
| 36 | + |
| 37 | + <OnPlatform |
| 38 | + x:TypeArguments="Color" |
| 39 | + x:Key="ActivityIndicatorColor" |
| 40 | + iOS="{ StaticResource iOSDefaultTintColor }" /> |
| 41 | + |
| 42 | + <OnPlatform |
| 43 | + x:TypeArguments="Color" |
| 44 | + x:Key="DefaultButtonClassBackgroundColor" |
| 45 | + Android="{ StaticResource AndroidDefaultButtonClassBackgroundColor }" |
| 46 | + iOS="{ StaticResource iOSDefaultButtonClassBackgroundColor }" /> |
| 47 | + |
| 48 | + <OnPlatform |
| 49 | + x:TypeArguments="Color" |
| 50 | + x:Key="DefaultButtonClassBorderColor" |
| 51 | + Android="{ StaticResource AndroidDefaultButtonClassBorderColor }" |
| 52 | + iOS="{ StaticResource iOSDefaultButtonClassBorderColor }" /> |
| 53 | + |
| 54 | + <OnPlatform |
| 55 | + x:TypeArguments="Color" |
| 56 | + x:Key="DefaultButtonClassTextColor" |
| 57 | + Android="{ StaticResource AndroidDefaultButtonClassTextColor }" |
| 58 | + iOS="{ StaticResource iOSDefaultButtonClassTextColor }" /> |
| 59 | + |
| 60 | + <OnPlatform |
| 61 | + x:TypeArguments="Color" |
| 62 | + x:Key="EntryBackgroundColor" |
| 63 | + Android="{ StaticResource AndroidEntryBackgroundColor }" |
| 64 | + iOS="{ StaticResource iOSEntryBackgroundColor }" /> |
| 65 | + |
| 66 | + <OnPlatform |
| 67 | + x:TypeArguments="Color" |
| 68 | + x:Key="ThemeListViewBackgroundColor" |
| 69 | + Android="{ StaticResource AndroidListViewBackgroundColor }" |
| 70 | + iOS="{ StaticResource iOSListViewBackgroundColor }" /> |
| 71 | + |
| 72 | + <!-- SIZES --> |
| 73 | + <OnPlatform |
| 74 | + x:TypeArguments="x:Double" |
| 75 | + x:Key="BaseButtonBorderRadius" |
| 76 | + iOS="6" /> |
| 77 | + |
| 78 | + <OnPlatform |
| 79 | + x:TypeArguments="x:Double" |
| 80 | + x:Key="BaseButtonBorderWidth" |
| 81 | + Android="0" |
| 82 | + iOS="0" /> |
21 | 83 |
|
22 | 84 | <!-- FONTS --> |
23 | 85 | <OnPlatform |
|
41 | 103 | Android="SourceSansPro-Regular.ttf#Source Sans Pro" |
42 | 104 | WinPhone="Assets/Fonts/SourceSansPro-Regular.ttf#Source Sans Pro"/> |
43 | 105 |
|
44 | | - <!-- FONT SIZES --> |
| 106 | + <OnPlatform |
| 107 | + x:TypeArguments="x:Double" |
| 108 | + x:Key="BaseButtonFontSize" |
| 109 | + Android="16" |
| 110 | + iOS="18" /> |
| 111 | + |
| 112 | + <OnPlatform |
| 113 | + x:TypeArguments="x:Double" |
| 114 | + x:Key="BaseFontSize" |
| 115 | + Android="15" |
| 116 | + iOS="16" /> |
| 117 | + |
45 | 118 | <OnPlatform |
46 | 119 | x:Key="LittleSize" |
47 | 120 | x:TypeArguments="x:Double" |
|
97 | 170 | iOS="32" |
98 | 171 | Android="48" |
99 | 172 | WinPhone="48"/> |
| 173 | + |
| 174 | + <OnPlatform |
| 175 | + x:TypeArguments="FontAttributes" |
| 176 | + x:Key="BaseButtonFontAttributes" |
| 177 | + Android="None" |
| 178 | + iOS="Bold" /> |
100 | 179 |
|
101 | 180 | <!-- CONVERTERS --> |
102 | 181 | <converters:CountToBoolConverter x:Key="CountToBoolConverter" /> |
|
108 | 187 | <converters:ItemsToHeightConverter x:Key="ItemsToHeightConverter" /> |
109 | 188 | <converters:ToUpperConverter x:Key="ToUpperConverter" /> |
110 | 189 |
|
111 | | - <!-- STYLES --> |
| 190 | + <!-- EXPLICIT STYLES --> |
112 | 191 | <Style x:Key="ValidationErrorLabelStyle" |
113 | 192 | TargetType="{x:Type Label}"> |
114 | 193 | <Setter Property="TextColor" |
|
180 | 259 | </Trigger> |
181 | 260 | </Style.Triggers> |
182 | 261 | </Style> |
| 262 | + |
| 263 | + <!-- IMPLICIT STYLES --> |
| 264 | + <Style TargetType="Button" ApplyToDerivedTypes="True" CanCascade="True"> |
| 265 | + <Setter Property="FontSize" Value="{ StaticResource BaseButtonFontSize }" /> |
| 266 | + <Setter Property="FontAttributes" Value="{ StaticResource BaseButtonFontAttributes }" /> |
| 267 | + <Setter Property="BorderRadius" Value="{ StaticResource BaseButtonBorderRadius }" /> |
| 268 | + <Setter Property="BorderWidth" Value="{ StaticResource BaseButtonBorderWidth }" /> |
| 269 | + <Setter Property="BackgroundColor" Value="{ StaticResource DefaultButtonClassBackgroundColor }" /> |
| 270 | + <Setter Property="BorderColor" Value="{ StaticResource DefaultButtonClassBorderColor }" /> |
| 271 | + <Setter Property="TextColor" Value="{ StaticResource DefaultButtonClassTextColor }" /> |
| 272 | + </Style> |
| 273 | + |
| 274 | + <Style TargetType="Label" ApplyToDerivedTypes="True" CanCascade="True"> |
| 275 | + <Setter Property="FontSize" Value="{ StaticResource BaseFontSize }" /> |
| 276 | + </Style> |
| 277 | + |
| 278 | + <Style TargetType="Entry" ApplyToDerivedTypes="True" CanCascade="True"> |
| 279 | + <Setter Property="TextColor" Value="{ StaticResource TextColor }" /> |
| 280 | + <Setter Property="PlaceholderColor" Value="{ StaticResource LightTextColor }" /> |
| 281 | + <Setter Property="BackgroundColor" Value="{ StaticResource EntryBackgroundColor }" /> |
| 282 | + </Style> |
| 283 | + |
| 284 | + <Style TargetType="ImageCell" ApplyToDerivedTypes="True" CanCascade="True"> |
| 285 | + <Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" /> |
| 286 | + <Setter Property="DetailColor" Value="{ StaticResource AccentColor }" /> |
| 287 | + </Style> |
| 288 | + |
| 289 | + <Style TargetType="TextCell" ApplyToDerivedTypes="True" CanCascade="True"> |
| 290 | + <Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" /> |
| 291 | + <Setter Property="DetailColor" Value="{ StaticResource AccentColor }" /> |
| 292 | + </Style> |
| 293 | + |
| 294 | + <Style TargetType="ListView" ApplyToDerivedTypes="True" CanCascade="True"> |
| 295 | + <Setter Property="BackgroundColor" Value="{ StaticResource ThemeListViewBackgroundColor }" /> |
| 296 | + <Setter Property="SeparatorColor" Value="{ StaticResource SeparatorLineColor }" /> |
| 297 | + <Setter Property="SeparatorVisibility" Value="Default" /> |
| 298 | + </Style> |
| 299 | + |
| 300 | + <Style TargetType="ActivityIndicator" ApplyToDerivedTypes="True" CanCascade="True"> |
| 301 | + <Setter Property="Color" Value="{ StaticResource ActivityIndicatorColor }" /> |
| 302 | + </Style> |
183 | 303 |
|
184 | 304 | <Style TargetType="NavigationPage"> |
185 | 305 | <Setter Property="BarBackgroundColor" Value="{StaticResource GreenColor}"/> |
|
0 commit comments