|
6 | 6 | xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core" |
7 | 7 | xmlns:animations="clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core" |
8 | 8 | xmlns:triggers="clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core" |
9 | | - xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core" |
10 | 9 | viewModelBase:ViewModelLocator.AutoWireViewModel="true" |
11 | 10 | Title="Settings"> |
12 | 11 | <ContentPage.Resources> |
13 | 12 | <ResourceDictionary> |
14 | 13 |
|
| 14 | + <Style x:Key="SettingsStackLayoutStyle" TargetType="{x:Type StackLayout}"> |
| 15 | + <Setter Property="Margin" |
| 16 | + Value="6" /> |
| 17 | + </Style> |
| 18 | + |
15 | 19 | <Style x:Key="SettingsTitleStyle" |
16 | 20 | TargetType="{x:Type Label}"> |
17 | 21 | <Setter Property="FontFamily" |
|
24 | 28 | Value="Center" /> |
25 | 29 | <Setter Property="Margin" |
26 | 30 | Value="12, 0" /> |
| 31 | + <Setter Property="TextColor" Value="{StaticResource GreenColor}" /> |
27 | 32 | </Style> |
28 | 33 |
|
29 | 34 | <Style x:Key="SettingsDescriptionStyle" |
30 | 35 | TargetType="{x:Type Label}" |
31 | 36 | BasedOn="{StaticResource SettingsTitleStyle}"> |
32 | 37 | <Setter Property="FontSize" |
33 | 38 | Value="{StaticResource LittleSize}" /> |
| 39 | + <Setter Property="TextColor" Value="{StaticResource BlackColor}" /> |
34 | 40 | </Style> |
35 | 41 |
|
36 | 42 | <Style x:Key="SettingsWarningMessageStyle" |
37 | 43 | TargetType="{x:Type Label}" |
38 | 44 | BasedOn="{StaticResource SettingsTitleStyle}"> |
39 | 45 | <Setter Property="FontSize" |
40 | 46 | Value="{StaticResource LittleSize}" /> |
41 | | - <Setter Property="TextColor" Value="Red" /> |
| 47 | + <Setter Property="TextColor" Value="{StaticResource ErrorColor}" /> |
42 | 48 | </Style> |
43 | 49 |
|
44 | 50 | <Style x:Key="SettingsToggleButtonStyle" |
|
49 | 55 | Value="48" /> |
50 | 56 | <Setter Property="VerticalOptions" |
51 | 57 | Value="Center" /> |
| 58 | + <Setter Property="HorizontalOptions" |
| 59 | + Value="Center" /> |
52 | 60 | <Setter Property="Margin" |
53 | | - Value="12, 12, 12, 0" /> |
| 61 | + Value="12,0" /> |
| 62 | + <Setter Property="Animate" |
| 63 | + Value="True" /> |
54 | 64 | </Style> |
55 | 65 |
|
56 | 66 | <Style x:Key="HeaderLabelStyle" |
|
63 | 73 | Value="{StaticResource GreenColor}" /> |
64 | 74 | <Setter Property="HorizontalOptions" |
65 | 75 | Value="Start" /> |
| 76 | + <Setter Property="Margin" |
| 77 | + Value="12,0" /> |
66 | 78 | </Style> |
67 | 79 |
|
68 | 80 | <animations:StoryBoard |
|
95 | 107 | <ScrollView> |
96 | 108 | <StackLayout |
97 | 109 | x:Name="MockServices"> |
98 | | - <!-- MOCK SERVICES --> |
99 | 110 | <Grid> |
100 | 111 | <Grid.ColumnDefinitions> |
101 | 112 | <ColumnDefinition Width="*" /> |
|
105 | 116 | <RowDefinition Height="1" /> |
106 | 117 | <RowDefinition Height="Auto" /> |
107 | 118 | <RowDefinition Height="Auto" /> |
108 | | - <RowDefinition Height="1" /> |
109 | 119 | <RowDefinition Height="Auto" /> |
110 | 120 | <RowDefinition Height="Auto" /> |
111 | 121 | <RowDefinition Height="Auto" /> |
112 | 122 | </Grid.RowDefinitions> |
113 | | - <Grid |
114 | | - Grid.Row="0" |
115 | | - Grid.Column="0" |
116 | | - Grid.ColumnSpan="2" |
117 | | - BackgroundColor="Gray"/> |
| 123 | + <!-- MOCK SERVICES --> |
118 | 124 | <StackLayout |
119 | 125 | Grid.Column="0" |
120 | | - Grid.Row="1"> |
| 126 | + Grid.Row="1" |
| 127 | + Style="{StaticResource SettingsStackLayoutStyle}"> |
121 | 128 | <Label |
122 | 129 | Text="{Binding TitleUseAzureServices}" |
123 | | - TextColor="{StaticResource GreenColor}" |
124 | 130 | Style="{StaticResource SettingsTitleStyle}"/> |
125 | 131 | <Label |
126 | 132 | Text="{Binding DescriptionUseAzureServices}" |
|
129 | 135 | <!-- ON / OFF --> |
130 | 136 | <controls:ToggleButton |
131 | 137 | Grid.Column="1" |
132 | | - Grid.Row="1" |
133 | | - Animate="True" |
| 138 | + Grid.Row="1" |
134 | 139 | Checked="{Binding UseAzureServices, Mode=TwoWay}" |
135 | 140 | Command="{Binding ToggleMockServicesCommand}" |
136 | 141 | Style="{StaticResource SettingsToggleButtonStyle}"> |
|
152 | 157 | Grid.Row="2" |
153 | 158 | Grid.Column="0" |
154 | 159 | Grid.ColumnSpan="2" |
155 | | - Margin="12, 0, 12, 12" |
| 160 | + Style="{StaticResource SettingsStackLayoutStyle}" |
156 | 161 | IsVisible="{Binding UseAzureServices}"> |
157 | 162 | <Label |
158 | 163 | Text="Endpoint" |
|
168 | 173 | </Entry.Style> |
169 | 174 | </Entry> |
170 | 175 | </StackLayout> |
171 | | - <Grid |
172 | | - Grid.Row="3" |
173 | | - Grid.Column="0" |
174 | | - Grid.ColumnSpan="2"/> |
| 176 | + |
| 177 | + <!-- USE LOCATIONS --> |
175 | 178 | <StackLayout |
176 | 179 | Grid.Column="0" |
177 | | - Grid.Row="4" |
178 | | - IsVisible="{Binding UserIsLogged}"> |
| 180 | + Grid.Row="3" |
| 181 | + IsVisible="{Binding UserIsLogged}" |
| 182 | + Style="{StaticResource SettingsStackLayoutStyle}"> |
179 | 183 | <Label |
180 | 184 | Text="{Binding TitleUseFakeLocation}" |
181 | | - TextColor="{StaticResource GreenColor}" |
182 | 185 | Style="{StaticResource SettingsTitleStyle}"/> |
183 | 186 | <Label |
184 | 187 | Text="{Binding DescriptionUseFakeLocation}" |
|
187 | 190 | <!-- ON / OFF --> |
188 | 191 | <controls:ToggleButton |
189 | 192 | Grid.Column="1" |
190 | | - Grid.Row="4" |
191 | | - Animate="True" |
| 193 | + Grid.Row="3" |
192 | 194 | Checked="{Binding UseFakeLocation, Mode=TwoWay}" |
193 | 195 | Command="{Binding ToggleFakeLocationCommand}" |
194 | 196 | Style="{StaticResource SettingsToggleButtonStyle}" |
|
208 | 210 | </controls:ToggleButton> |
209 | 211 | <!-- FAKE LOCATIONS --> |
210 | 212 | <StackLayout |
211 | | - Grid.Row="5" |
| 213 | + Grid.Row="4" |
212 | 214 | Grid.Column="0" |
213 | 215 | Grid.ColumnSpan="2" |
214 | | - Margin="12, 0, 12, 12" |
| 216 | + Style="{StaticResource SettingsStackLayoutStyle}" |
215 | 217 | IsVisible="{Binding UseFakeLocation}"> |
216 | 218 | <Label |
217 | 219 | Text="Latitude" |
|
245 | 247 | Command="{Binding ToggleSendLocationCommand}" |
246 | 248 | Text="Send Location"/> |
247 | 249 | </StackLayout> |
248 | | - <!-- GPS USAGE --> |
249 | | - <StackLayout |
250 | | - Grid.Row="5" |
251 | | - Grid.Column="0" |
252 | | - Grid.ColumnSpan="2" |
253 | | - Margin="12, 0, 12, 12" |
254 | | - IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}"> |
255 | | - </StackLayout> |
256 | | - <!--<Grid |
257 | | - Grid.Row="6" |
258 | | - Grid.Column="0" |
259 | | - Grid.ColumnSpan="2"/>--> |
| 250 | + <!-- ALLOW GPS LOCATION --> |
260 | 251 | <StackLayout |
261 | 252 | Grid.Column="0" |
262 | | - Grid.Row="6" |
| 253 | + Grid.Row="5" |
| 254 | + Style="{StaticResource SettingsStackLayoutStyle}" |
263 | 255 | IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}"> |
264 | 256 | <Label |
265 | 257 | Text="{Binding TitleAllowGpsLocation}" |
266 | | - TextColor="{StaticResource GreenColor}" |
| 258 | + |
267 | 259 | Style="{StaticResource SettingsTitleStyle}"/> |
268 | 260 | <Label |
269 | 261 | Text="{Binding DescriptionAllowGpsLocation}" |
|
275 | 267 | <!-- ON / OFF --> |
276 | 268 | <controls:ToggleButton |
277 | 269 | Grid.Column="1" |
278 | | - Grid.Row="6" |
279 | | - Animate="True" |
| 270 | + Grid.Row="5" |
280 | 271 | Checked="{Binding AllowGpsLocation, Mode=TwoWay}" |
281 | 272 | Command="{Binding ToggleAllowGpsLocationCommand}" |
282 | 273 | Style="{StaticResource SettingsToggleButtonStyle}" |
|
0 commit comments