Skip to content

Commit 2900577

Browse files
committed
Add styling
1 parent 55c2c66 commit 2900577

2 files changed

Lines changed: 34 additions & 42 deletions

File tree

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignView.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
RowSpacing="0">
4545
<Grid.RowDefinitions>
4646
<RowDefinition Height="Auto" />
47+
<RowDefinition Height="*" />
4748
</Grid.RowDefinitions>
4849
<!-- CAMPAIGNS -->
4950
<Grid

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
77
xmlns:animations="clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core"
88
xmlns:triggers="clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core"
9-
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
109
viewModelBase:ViewModelLocator.AutoWireViewModel="true"
1110
Title="Settings">
1211
<ContentPage.Resources>
1312
<ResourceDictionary>
1413

14+
<Style x:Key="SettingsStackLayoutStyle" TargetType="{x:Type StackLayout}">
15+
<Setter Property="Margin"
16+
Value="6" />
17+
</Style>
18+
1519
<Style x:Key="SettingsTitleStyle"
1620
TargetType="{x:Type Label}">
1721
<Setter Property="FontFamily"
@@ -24,21 +28,23 @@
2428
Value="Center" />
2529
<Setter Property="Margin"
2630
Value="12, 0" />
31+
<Setter Property="TextColor" Value="{StaticResource GreenColor}" />
2732
</Style>
2833

2934
<Style x:Key="SettingsDescriptionStyle"
3035
TargetType="{x:Type Label}"
3136
BasedOn="{StaticResource SettingsTitleStyle}">
3237
<Setter Property="FontSize"
3338
Value="{StaticResource LittleSize}" />
39+
<Setter Property="TextColor" Value="{StaticResource BlackColor}" />
3440
</Style>
3541

3642
<Style x:Key="SettingsWarningMessageStyle"
3743
TargetType="{x:Type Label}"
3844
BasedOn="{StaticResource SettingsTitleStyle}">
3945
<Setter Property="FontSize"
4046
Value="{StaticResource LittleSize}" />
41-
<Setter Property="TextColor" Value="Red" />
47+
<Setter Property="TextColor" Value="{StaticResource ErrorColor}" />
4248
</Style>
4349

4450
<Style x:Key="SettingsToggleButtonStyle"
@@ -49,8 +55,12 @@
4955
Value="48" />
5056
<Setter Property="VerticalOptions"
5157
Value="Center" />
58+
<Setter Property="HorizontalOptions"
59+
Value="Center" />
5260
<Setter Property="Margin"
53-
Value="12, 12, 12, 0" />
61+
Value="12,0" />
62+
<Setter Property="Animate"
63+
Value="True" />
5464
</Style>
5565

5666
<Style x:Key="HeaderLabelStyle"
@@ -63,6 +73,8 @@
6373
Value="{StaticResource GreenColor}" />
6474
<Setter Property="HorizontalOptions"
6575
Value="Start" />
76+
<Setter Property="Margin"
77+
Value="12,0" />
6678
</Style>
6779

6880
<animations:StoryBoard
@@ -95,7 +107,6 @@
95107
<ScrollView>
96108
<StackLayout
97109
x:Name="MockServices">
98-
<!-- MOCK SERVICES -->
99110
<Grid>
100111
<Grid.ColumnDefinitions>
101112
<ColumnDefinition Width="*" />
@@ -105,22 +116,17 @@
105116
<RowDefinition Height="1" />
106117
<RowDefinition Height="Auto" />
107118
<RowDefinition Height="Auto" />
108-
<RowDefinition Height="1" />
109119
<RowDefinition Height="Auto" />
110120
<RowDefinition Height="Auto" />
111121
<RowDefinition Height="Auto" />
112122
</Grid.RowDefinitions>
113-
<Grid
114-
Grid.Row="0"
115-
Grid.Column="0"
116-
Grid.ColumnSpan="2"
117-
BackgroundColor="Gray"/>
123+
<!-- MOCK SERVICES -->
118124
<StackLayout
119125
Grid.Column="0"
120-
Grid.Row="1">
126+
Grid.Row="1"
127+
Style="{StaticResource SettingsStackLayoutStyle}">
121128
<Label
122129
Text="{Binding TitleUseAzureServices}"
123-
TextColor="{StaticResource GreenColor}"
124130
Style="{StaticResource SettingsTitleStyle}"/>
125131
<Label
126132
Text="{Binding DescriptionUseAzureServices}"
@@ -129,8 +135,7 @@
129135
<!-- ON / OFF -->
130136
<controls:ToggleButton
131137
Grid.Column="1"
132-
Grid.Row="1"
133-
Animate="True"
138+
Grid.Row="1"
134139
Checked="{Binding UseAzureServices, Mode=TwoWay}"
135140
Command="{Binding ToggleMockServicesCommand}"
136141
Style="{StaticResource SettingsToggleButtonStyle}">
@@ -152,7 +157,7 @@
152157
Grid.Row="2"
153158
Grid.Column="0"
154159
Grid.ColumnSpan="2"
155-
Margin="12, 0, 12, 12"
160+
Style="{StaticResource SettingsStackLayoutStyle}"
156161
IsVisible="{Binding UseAzureServices}">
157162
<Label
158163
Text="Endpoint"
@@ -168,17 +173,15 @@
168173
</Entry.Style>
169174
</Entry>
170175
</StackLayout>
171-
<Grid
172-
Grid.Row="3"
173-
Grid.Column="0"
174-
Grid.ColumnSpan="2"/>
176+
177+
<!-- USE LOCATIONS -->
175178
<StackLayout
176179
Grid.Column="0"
177-
Grid.Row="4"
178-
IsVisible="{Binding UserIsLogged}">
180+
Grid.Row="3"
181+
IsVisible="{Binding UserIsLogged}"
182+
Style="{StaticResource SettingsStackLayoutStyle}">
179183
<Label
180184
Text="{Binding TitleUseFakeLocation}"
181-
TextColor="{StaticResource GreenColor}"
182185
Style="{StaticResource SettingsTitleStyle}"/>
183186
<Label
184187
Text="{Binding DescriptionUseFakeLocation}"
@@ -187,8 +190,7 @@
187190
<!-- ON / OFF -->
188191
<controls:ToggleButton
189192
Grid.Column="1"
190-
Grid.Row="4"
191-
Animate="True"
193+
Grid.Row="3"
192194
Checked="{Binding UseFakeLocation, Mode=TwoWay}"
193195
Command="{Binding ToggleFakeLocationCommand}"
194196
Style="{StaticResource SettingsToggleButtonStyle}"
@@ -208,10 +210,10 @@
208210
</controls:ToggleButton>
209211
<!-- FAKE LOCATIONS -->
210212
<StackLayout
211-
Grid.Row="5"
213+
Grid.Row="4"
212214
Grid.Column="0"
213215
Grid.ColumnSpan="2"
214-
Margin="12, 0, 12, 12"
216+
Style="{StaticResource SettingsStackLayoutStyle}"
215217
IsVisible="{Binding UseFakeLocation}">
216218
<Label
217219
Text="Latitude"
@@ -245,25 +247,15 @@
245247
Command="{Binding ToggleSendLocationCommand}"
246248
Text="Send Location"/>
247249
</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 -->
260251
<StackLayout
261252
Grid.Column="0"
262-
Grid.Row="6"
253+
Grid.Row="5"
254+
Style="{StaticResource SettingsStackLayoutStyle}"
263255
IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}">
264256
<Label
265257
Text="{Binding TitleAllowGpsLocation}"
266-
TextColor="{StaticResource GreenColor}"
258+
267259
Style="{StaticResource SettingsTitleStyle}"/>
268260
<Label
269261
Text="{Binding DescriptionAllowGpsLocation}"
@@ -275,8 +267,7 @@
275267
<!-- ON / OFF -->
276268
<controls:ToggleButton
277269
Grid.Column="1"
278-
Grid.Row="6"
279-
Animate="True"
270+
Grid.Row="5"
280271
Checked="{Binding AllowGpsLocation, Mode=TwoWay}"
281272
Command="{Binding ToggleAllowGpsLocationCommand}"
282273
Style="{StaticResource SettingsToggleButtonStyle}"

0 commit comments

Comments
 (0)