Browse Source

Add styling

pull/223/merge
Christian Arenas 7 years ago
parent
commit
290057789b
2 changed files with 34 additions and 42 deletions
  1. +1
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignView.xaml
  2. +33
    -42
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml

+ 1
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignView.xaml View File

@ -44,6 +44,7 @@
RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- CAMPAIGNS -->
<Grid


+ 33
- 42
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml View File

@ -6,12 +6,16 @@
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
xmlns:animations="clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core"
xmlns:triggers="clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core"
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
viewModelBase:ViewModelLocator.AutoWireViewModel="true"
Title="Settings">
<ContentPage.Resources>
<ResourceDictionary>
<Style x:Key="SettingsStackLayoutStyle" TargetType="{x:Type StackLayout}">
<Setter Property="Margin"
Value="6" />
</Style>
<Style x:Key="SettingsTitleStyle"
TargetType="{x:Type Label}">
<Setter Property="FontFamily"
@ -24,6 +28,7 @@
Value="Center" />
<Setter Property="Margin"
Value="12, 0" />
<Setter Property="TextColor" Value="{StaticResource GreenColor}" />
</Style>
<Style x:Key="SettingsDescriptionStyle"
@ -31,6 +36,7 @@
BasedOn="{StaticResource SettingsTitleStyle}">
<Setter Property="FontSize"
Value="{StaticResource LittleSize}" />
<Setter Property="TextColor" Value="{StaticResource BlackColor}" />
</Style>
<Style x:Key="SettingsWarningMessageStyle"
@ -38,7 +44,7 @@
BasedOn="{StaticResource SettingsTitleStyle}">
<Setter Property="FontSize"
Value="{StaticResource LittleSize}" />
<Setter Property="TextColor" Value="Red" />
<Setter Property="TextColor" Value="{StaticResource ErrorColor}" />
</Style>
<Style x:Key="SettingsToggleButtonStyle"
@ -49,8 +55,12 @@
Value="48" />
<Setter Property="VerticalOptions"
Value="Center" />
<Setter Property="HorizontalOptions"
Value="Center" />
<Setter Property="Margin"
Value="12, 12, 12, 0" />
Value="12,0" />
<Setter Property="Animate"
Value="True" />
</Style>
<Style x:Key="HeaderLabelStyle"
@ -63,6 +73,8 @@
Value="{StaticResource GreenColor}" />
<Setter Property="HorizontalOptions"
Value="Start" />
<Setter Property="Margin"
Value="12,0" />
</Style>
<animations:StoryBoard
@ -95,7 +107,6 @@
<ScrollView>
<StackLayout
x:Name="MockServices">
<!-- MOCK SERVICES -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@ -105,22 +116,17 @@
<RowDefinition Height="1" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="1" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
BackgroundColor="Gray"/>
<!-- MOCK SERVICES -->
<StackLayout
Grid.Column="0"
Grid.Row="1">
Grid.Row="1"
Style="{StaticResource SettingsStackLayoutStyle}">
<Label
Text="{Binding TitleUseAzureServices}"
TextColor="{StaticResource GreenColor}"
Style="{StaticResource SettingsTitleStyle}"/>
<Label
Text="{Binding DescriptionUseAzureServices}"
@ -129,8 +135,7 @@
<!-- ON / OFF -->
<controls:ToggleButton
Grid.Column="1"
Grid.Row="1"
Animate="True"
Grid.Row="1"
Checked="{Binding UseAzureServices, Mode=TwoWay}"
Command="{Binding ToggleMockServicesCommand}"
Style="{StaticResource SettingsToggleButtonStyle}">
@ -152,7 +157,7 @@
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="12, 0, 12, 12"
Style="{StaticResource SettingsStackLayoutStyle}"
IsVisible="{Binding UseAzureServices}">
<Label
Text="Endpoint"
@ -168,17 +173,15 @@
</Entry.Style>
</Entry>
</StackLayout>
<Grid
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"/>
<!-- USE LOCATIONS -->
<StackLayout
Grid.Column="0"
Grid.Row="4"
IsVisible="{Binding UserIsLogged}">
Grid.Row="3"
IsVisible="{Binding UserIsLogged}"
Style="{StaticResource SettingsStackLayoutStyle}">
<Label
Text="{Binding TitleUseFakeLocation}"
TextColor="{StaticResource GreenColor}"
Style="{StaticResource SettingsTitleStyle}"/>
<Label
Text="{Binding DescriptionUseFakeLocation}"
@ -187,8 +190,7 @@
<!-- ON / OFF -->
<controls:ToggleButton
Grid.Column="1"
Grid.Row="4"
Animate="True"
Grid.Row="3"
Checked="{Binding UseFakeLocation, Mode=TwoWay}"
Command="{Binding ToggleFakeLocationCommand}"
Style="{StaticResource SettingsToggleButtonStyle}"
@ -208,10 +210,10 @@
</controls:ToggleButton>
<!-- FAKE LOCATIONS -->
<StackLayout
Grid.Row="5"
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="12, 0, 12, 12"
Style="{StaticResource SettingsStackLayoutStyle}"
IsVisible="{Binding UseFakeLocation}">
<Label
Text="Latitude"
@ -245,25 +247,15 @@
Command="{Binding ToggleSendLocationCommand}"
Text="Send Location"/>
</StackLayout>
<!-- GPS USAGE -->
<StackLayout
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="12, 0, 12, 12"
IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}">
</StackLayout>
<!--<Grid
Grid.Row="6"
Grid.Column="0"
Grid.ColumnSpan="2"/>-->
<!-- ALLOW GPS LOCATION -->
<StackLayout
Grid.Column="0"
Grid.Row="6"
Grid.Row="5"
Style="{StaticResource SettingsStackLayoutStyle}"
IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}">
<Label
Text="{Binding TitleAllowGpsLocation}"
TextColor="{StaticResource GreenColor}"
Style="{StaticResource SettingsTitleStyle}"/>
<Label
Text="{Binding DescriptionAllowGpsLocation}"
@ -275,8 +267,7 @@
<!-- ON / OFF -->
<controls:ToggleButton
Grid.Column="1"
Grid.Row="6"
Animate="True"
Grid.Row="5"
Checked="{Binding AllowGpsLocation, Mode=TwoWay}"
Command="{Binding ToggleAllowGpsLocationCommand}"
Style="{StaticResource SettingsToggleButtonStyle}"


Loading…
Cancel
Save