Browse Source

Replaced deprecated OnPlatform API. Fixes #399

pull/417/head
David Britch 7 years ago
parent
commit
1545eb80bd
14 changed files with 277 additions and 310 deletions
  1. +110
    -119
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml
  2. +8
    -10
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/AddBasketButton.xaml
  3. +4
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml
  4. +4
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignView.xaml
  5. +4
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CatalogView.xaml
  6. +4
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CheckoutView.xaml
  7. +8
    -10
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/FiltersView.xaml
  8. +39
    -45
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml
  9. +23
    -29
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml
  10. +4
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/OrderDetailView.xaml
  11. +46
    -44
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml
  12. +5
    -6
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/BasketItemTemplate.xaml
  13. +9
    -11
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/CampaignTemplate.xaml
  14. +9
    -11
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/ProductTemplate.xaml

+ 110
- 119
src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml View File

@ -34,148 +34,139 @@
<Color x:Key="AndroidListViewBackgroundColor">Transparent</Color>
<Color x:Key="iOSListViewBackgroundColor">Transparent</Color>
<OnPlatform
x:TypeArguments="Color"
x:Key="ActivityIndicatorColor"
iOS="{ StaticResource iOSDefaultTintColor }" />
<OnPlatform x:TypeArguments="Color"
x:Key="ActivityIndicatorColor">
<On Platform="iOS" Value="{ StaticResource iOSDefaultTintColor }" />
</OnPlatform>
<OnPlatform
x:TypeArguments="Color"
x:Key="DefaultButtonClassBackgroundColor"
Android="{ StaticResource AndroidDefaultButtonClassBackgroundColor }"
iOS="{ StaticResource iOSDefaultButtonClassBackgroundColor }" />
<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"
Android="{ StaticResource AndroidDefaultButtonClassBorderColor }"
iOS="{ StaticResource iOSDefaultButtonClassBorderColor }" />
<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"
Android="{ StaticResource AndroidDefaultButtonClassTextColor }"
iOS="{ StaticResource iOSDefaultButtonClassTextColor }" />
<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"
Android="{ StaticResource AndroidEntryBackgroundColor }"
iOS="{ StaticResource iOSEntryBackgroundColor }" />
<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"
Android="{ StaticResource AndroidListViewBackgroundColor }"
iOS="{ StaticResource iOSListViewBackgroundColor }" />
<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"
iOS="6" />
<OnPlatform x:TypeArguments="x:Double"
x:Key="BaseButtonBorderRadius">
<On Platform="iOS" Value="6" />
</OnPlatform>
<OnPlatform
x:TypeArguments="x:Double"
x:Key="BaseButtonBorderWidth"
Android="0"
iOS="0" />
<OnPlatform x:TypeArguments="x:Double"
x:Key="BaseButtonBorderWidth">
<On Platform="iOS, Android" Value="0" />
</OnPlatform>
<!-- FONTS -->
<OnPlatform
x:Key="MontserratRegular"
x:TypeArguments="x:String"
iOS="Montserrat-Regular"
Android="Montserrat-Regular.ttf#Montserrat"
WinPhone="Assets/Fonts/Montserrat-Regular.ttf#Montserrat"/>
<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"
iOS="Montserrat-Bold"
Android="Montserrat-Bold.ttf#Montserrat"
WinPhone="Assets/Fonts/Montserrat-Bold.ttf#Montserrat"/>
<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"
iOS="SourceSansPro-Regular"
Android="SourceSansPro-Regular.ttf#Source Sans Pro"
WinPhone="Assets/Fonts/SourceSansPro-Regular.ttf#Source Sans Pro"/>
<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"
Android="16"
iOS="18" />
<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"
Android="15"
iOS="16" />
<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"
iOS="11"
Android="12"
WinPhone="12"/>
<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"
iOS="12"
Android="14"
WinPhone="14"/>
<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"
iOS="14"
Android="16"
WinPhone="16"/>
<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"
iOS="16"
Android="18"
WinPhone="18"/>
<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"
iOS="18"
Android="20"
WinPhone="20"/>
<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"
iOS="20"
Android="24"
WinPhone="24"/>
<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"
iOS="24"
Android="32"
WinPhone="32"/>
<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"
iOS="32"
Android="48"
WinPhone="48"/>
<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"
Android="None"
iOS="Bold" />
<OnPlatform x:TypeArguments="FontAttributes"
x:Key="BaseButtonFontAttributes">
<On Platform="iOS" Value="Bold" />
<On Platform="Android" Value="None" />
</OnPlatform>
<!-- CONVERTERS -->
<converters:CountToBoolConverter x:Key="CountToBoolConverter" />


+ 8
- 10
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/AddBasketButton.xaml View File

@ -44,11 +44,10 @@
<!-- ANDROID -->
<Grid>
<Grid.IsVisible>
<OnPlatform
x:TypeArguments="x:Boolean"
Android="True"
iOS="True"
WinPhone="False"/>
<OnPlatform x:TypeArguments="x:Boolean">
<On Platform="iOS, Android" Value="True" />
<On Platform="UWP, WinRT, WinPhone" Value="False" />
</OnPlatform>
</Grid.IsVisible>
<BoxView
BackgroundColor="{StaticResource LightGreenColor}"
@ -64,11 +63,10 @@
<!-- IOS & UWP -->
<Grid>
<Grid.IsVisible>
<OnPlatform
x:TypeArguments="x:Boolean"
Android="False"
iOS="False"
WinPhone="True"/>
<OnPlatform x:TypeArguments="x:Boolean">
<On Platform="iOS, Android" Value="False" />
<On Platform="UWP, WinRT, WinPhone" Value="True" />
</OnPlatform>
</Grid.IsVisible>
<Image
Source="Assets\circle_button_background.png"


+ 4
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml View File

@ -171,11 +171,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>

+ 4
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignView.xaml View File

@ -90,11 +90,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>

+ 4
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CatalogView.xaml View File

@ -114,11 +114,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>

+ 4
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CheckoutView.xaml View File

@ -231,11 +231,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>

+ 8
- 10
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/FiltersView.xaml View File

@ -76,11 +76,10 @@
SelectedItem="{Binding Brand, Mode=TwoWay}"
Style="{StaticResource FilterPickerStyle}">
<Picker.HeightRequest>
<OnPlatform
x:TypeArguments="x:Double"
Android="48"
iOS="48"
WinPhone="36"/>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="48" />
<On Platform="UWP, WinRT, WinPhone" Value="36" />
</OnPlatform>
</Picker.HeightRequest>
</Picker>
<!-- TYPE -->
@ -91,11 +90,10 @@
SelectedItem="{Binding Type, Mode=TwoWay}"
Style="{StaticResource FilterPickerStyle}">
<Picker.HeightRequest>
<OnPlatform
x:TypeArguments="x:Double"
Android="48"
iOS="48"
WinPhone="36"/>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="48" />
<On Platform="UWP, WinRT, WinPhone" Value="36" />
</OnPlatform>
</Picker.HeightRequest>
</Picker>
<Button


+ 39
- 45
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml View File

@ -9,10 +9,9 @@
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
viewModelBase:ViewModelLocator.AutoWireViewModel="true">
<ContentPage.Title>
<OnPlatform
x:TypeArguments="x:String"
iOS="eShop on Containers"
WinPhone="eShop on Containers"/>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS, UWP, WinRT, WinPhone" Value="eShop on Containers" />
</OnPlatform>
</ContentPage.Title>
<ContentPage.Resources>
<ResourceDictionary>
@ -179,10 +178,10 @@
Style="{StaticResource HeaderLabelStyle}" />
<Entry Text="{Binding UserName.Value, Mode=TwoWay}">
<Entry.Style>
<OnPlatform x:TypeArguments="Style"
iOS="{StaticResource EntryStyle}"
Android="{StaticResource EntryStyle}"
WinPhone="{StaticResource UwpEntryStyle}"/>
<OnPlatform x:TypeArguments="Style">
<On Platform="iOS, Android" Value="{StaticResource EntryStyle}" />
<On Platform="UWP, WinRT, WinPhone" Value="{StaticResource UwpEntryStyle}" />
</OnPlatform>
</Entry.Style>
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
@ -208,10 +207,10 @@
IsPassword="True"
Text="{Binding Password.Value, Mode=TwoWay}">
<Entry.Style>
<OnPlatform x:TypeArguments="Style"
iOS="{StaticResource EntryStyle}"
Android="{StaticResource EntryStyle}"
WinPhone="{StaticResource UwpEntryStyle}"/>
<OnPlatform x:TypeArguments="Style">
<On Platform="iOS, Android" Value="{StaticResource EntryStyle}" />
<On Platform="UWP, WinRT, WinPhone" Value="{StaticResource UwpEntryStyle}" />
</OnPlatform>
</Entry.Style>
<Entry.Behaviors>
<behaviors:EventToCommandBehavior
@ -270,11 +269,10 @@
Grid.ColumnSpan="3"
Aspect="AspectFill">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
Android="banner.png"
iOS="banner.png"
WinPhone="Assets\banner.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="banner.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\banner.png" />
</OnPlatform>
</Image.Source>
</Image>
<Grid
@ -319,11 +317,10 @@
<Image
Style="{StaticResource SettingsImageStyle}">
<Image.Source>
<OnPlatform
x:TypeArguments="ImageSource"
WinPhone="Assets/app_settings.png"
Android="app_settings"
iOS="app_settings"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="app_settings" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/app_settings.png" />
</OnPlatform>
</Image.Source>
</Image>
<Grid.GestureRecognizers>
@ -345,24 +342,22 @@
AbsoluteLayout.LayoutFlags="All">
<WebView.Behaviors>
<OnPlatform x:TypeArguments="Behavior">
<OnPlatform.Android>
<behaviors:EventToCommandBehavior
EventName="Navigating"
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
Command="{Binding NavigateCommand}" />
</OnPlatform.Android>
<OnPlatform.iOS>
<behaviors:EventToCommandBehavior
EventName="Navigating"
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
Command="{Binding NavigateCommand}" />
</OnPlatform.iOS>
<OnPlatform.WinPhone>
<behaviors:EventToCommandBehavior
EventName="Navigated"
EventArgsConverter="{StaticResource WebNavigatedEventArgsConverter}"
Command="{Binding NavigateCommand}" />
</OnPlatform.WinPhone>
<On Platform="iOS, Android">
<On.Value>
<behaviors:EventToCommandBehavior
EventName="Navigating"
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
Command="{Binding NavigateCommand}" />
</On.Value>
</On>
<On Platform="UWP">
<On.Value>
<behaviors:EventToCommandBehavior
EventName="Navigated"
EventArgsConverter="{StaticResource WebNavigatedEventArgsConverter}"
Command="{Binding NavigateCommand}" />
</On.Value>
</On>
</OnPlatform>
</WebView.Behaviors>
</WebView>
@ -376,11 +371,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>

+ 23
- 29
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/MainView.xaml View File

@ -10,21 +10,19 @@
BarTextColor="{StaticResource WhiteColor}"
viewModelBase:ViewModelLocator.AutoWireViewModel="true">
<TabbedPage.Title>
<OnPlatform
x:TypeArguments="x:String"
iOS="eShop on Containers"
WinPhone="eShop on Containers"/>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS, UWP, WinRT, WinPhone" Value="eShop on Containers" />
</OnPlatform>
</TabbedPage.Title>
<ContentPage.ToolbarItems>
<ToolbarItem
Command="{Binding SettingsCommand}"
Text="Settings">
<ToolbarItem.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
WinPhone="Assets/app_settings.png"
Android="app_settings"
iOS="app_settings"/>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="app_settings" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/app_settings.png" />
</OnPlatform>
</ToolbarItem.Icon>
</ToolbarItem>
</ContentPage.ToolbarItems>
@ -32,22 +30,20 @@
<views:CatalogView
x:Name="HomeView">
<views:CatalogView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_filter"
iOS="menu_filter"
WinPhone="Assets\menu_filter.png"/>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="menu_filter" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_filter.png" />
</OnPlatform>
</views:CatalogView.Icon>
</views:CatalogView>
<!-- PROFILE -->
<views:ProfileView
x:Name="ProfileView">
<views:ProfileView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_profile"
iOS="menu_profile"
WinPhone="Assets\menu_profile.png"/>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="menu_profile" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_profile.png" />
</OnPlatform>
</views:ProfileView.Icon>
</views:ProfileView>
<!-- BASKET -->
@ -56,22 +52,20 @@
controls:CustomTabbedPage.BadgeText="{Binding BadgeCount}"
controls:CustomTabbedPage.BadgeColor="{StaticResource LightGreenColor}">
<views:BasketView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_cart"
iOS="menu_cart"
WinPhone="Assets\menu_cart.png"/>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="menu_cart" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_cart.png" />
</OnPlatform>
</views:BasketView.Icon>
</views:BasketView>
<!-- CAMPAIGNS -->
<views:CampaignView
x:Name="CampaignView">
<views:CampaignView.Icon>
<OnPlatform
x:TypeArguments="FileImageSource"
Android="menu_campaigns"
iOS="menu_campaigns"
WinPhone="Assets\menu_campaigns.png"/>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="menu_campaigns" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_campaigns.png" />
</OnPlatform>
</views:CampaignView.Icon>
</views:CampaignView>
</TabbedPage>

+ 4
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/OrderDetailView.xaml View File

@ -264,11 +264,10 @@
VerticalOptions="Center"
HorizontalOptions="Center">
<ActivityIndicator.WidthRequest>
<OnPlatform
x:TypeArguments="x:Double"
iOS="100"
Android="100"
WinPhone="400" />
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS, Android" Value="100" />
<On Platform="UWP, WinRT, WinPhone" Value="400" />
</OnPlatform>
</ActivityIndicator.WidthRequest>
</ActivityIndicator>
</Grid>


+ 46
- 44
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml View File

@ -99,11 +99,10 @@
<animations:FadeInAnimation
Direction="Up">
<animations:FadeInAnimation.Duration>
<OnPlatform
x:TypeArguments="x:String"
Android="500"
iOS="0"
WinPhone="500"/>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS" Value="0" />
<On Platform="Android, UWP, WinRT, WinPhone" Value="500" />
</OnPlatform>
</animations:FadeInAnimation.Duration>
</animations:FadeInAnimation>
</animations:StoryBoard>
@ -156,16 +155,18 @@
Command="{Binding ToggleMockServicesCommand}"
Style="{StaticResource SettingsToggleButtonStyle}">
<controls:ToggleButton.CheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_on.png"
iOS="switchOn.png"
WinPhone="Assets/switchOn.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOn.png" />
<On Platform="Android" Value="switch_on.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOn.png" />
</OnPlatform>
</controls:ToggleButton.CheckedImage>
<controls:ToggleButton.UnCheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_off.png"
iOS="switchOff.png"
WinPhone="Assets/switchOff.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOff.png" />
<On Platform="Android" Value="switch_off.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOff.png" />
</OnPlatform>
</controls:ToggleButton.UnCheckedImage>
</controls:ToggleButton>
<!-- ENDPOINT -->
@ -181,11 +182,10 @@
<Entry
Text="{Binding Endpoint, Mode=TwoWay}">
<Entry.Style>
<OnPlatform
x:TypeArguments="Style"
iOS="{StaticResource SettingsEntryStyle}"
Android="{StaticResource SettingsEntryStyle}"
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
<OnPlatform x:TypeArguments="Style">
<On Platform="iOS, Android" Value="{StaticResource SettingsEntryStyle}" />
<On Platform="UWP, WinRT, WinPhone" Value="{StaticResource SettingsUwpEntryStyle}" />
</OnPlatform>
</Entry.Style>
</Entry>
</StackLayout>
@ -212,16 +212,18 @@
Style="{StaticResource SettingsToggleButtonStyle}"
IsVisible="{Binding UserIsLogged}">
<controls:ToggleButton.CheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_on.png"
iOS="switchOn.png"
WinPhone="Assets/switchOn.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOn.png" />
<On Platform="Android" Value="switch_on.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOn.png" />
</OnPlatform>
</controls:ToggleButton.CheckedImage>
<controls:ToggleButton.UnCheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_off.png"
iOS="switchOff.png"
WinPhone="Assets/switchOff.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOff.png" />
<On Platform="Android" Value="switch_off.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOff.png" />
</OnPlatform>
</controls:ToggleButton.UnCheckedImage>
</controls:ToggleButton>
<!-- FAKE LOCATIONS -->
@ -238,11 +240,10 @@
Text="{Binding Latitude, Mode=TwoWay, Converter={StaticResource DoubleConverter}}"
Keyboard="Text">
<Entry.Style>
<OnPlatform
x:TypeArguments="Style"
iOS="{StaticResource SettingsEntryStyle}"
Android="{StaticResource SettingsEntryStyle}"
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
<OnPlatform x:TypeArguments="Style">
<On Platform="iOS, Android" Value="{StaticResource SettingsEntryStyle}" />
<On Platform="UWP, WinRT, WinPhone" Value="{StaticResource SettingsUwpEntryStyle}" />
</OnPlatform>
</Entry.Style>
</Entry>
<Label
@ -252,11 +253,10 @@
Text="{Binding Longitude, Mode=TwoWay, Converter={StaticResource DoubleConverter}}"
Keyboard="Text">
<Entry.Style>
<OnPlatform
x:TypeArguments="Style"
iOS="{StaticResource SettingsEntryStyle}"
Android="{StaticResource SettingsEntryStyle}"
WinPhone="{StaticResource SettingsUwpEntryStyle}"/>
<OnPlatform x:TypeArguments="Style">
<On Platform="iOS, Android" Value="{StaticResource SettingsEntryStyle}" />
<On Platform="UWP, WinRT, WinPhone" Value="{StaticResource SettingsUwpEntryStyle}" />
</OnPlatform>
</Entry.Style>
</Entry>
<Button
@ -289,16 +289,18 @@
Style="{StaticResource SettingsToggleButtonStyle}"
IsVisible="{Binding UseFakeLocation, Converter={StaticResource InverseBoolConverter}}">
<controls:ToggleButton.CheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_on.png"
iOS="switchOn.png"
WinPhone="Assets/switchOn.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOn.png" />
<On Platform="Android" Value="switch_on.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOn.png" />
</OnPlatform>
</controls:ToggleButton.CheckedImage>
<controls:ToggleButton.UnCheckedImage>
<OnPlatform x:TypeArguments="ImageSource"
Android="switch_off.png"
iOS="switchOff.png"
WinPhone="Assets/switchOff.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" Value="switchOff.png" />
<On Platform="Android" Value="switch_off.png" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/switchOff.png" />
</OnPlatform>
</controls:ToggleButton.UnCheckedImage>
</controls:ToggleButton>
</Grid>


+ 5
- 6
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/BasketItemTemplate.xaml View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
@ -71,11 +71,10 @@
<Grid
BackgroundColor="{StaticResource BackgroundColor}">
<Grid.Padding>
<OnPlatform
x:TypeArguments="Thickness"
Android="0"
iOS="0"
WinPhone="12, 0"/>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS, Android" Value="0" />
<On Platform="UWP, WinRT, WinPhone" Value="12, 0" />
</OnPlatform>
</Grid.Padding>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />


+ 9
- 11
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/CampaignTemplate.xaml View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
@ -59,18 +59,16 @@
Source="{Binding PictureUri}"
Aspect="AspectFill">
<ffimageloading:CachedImage.LoadingPlaceholder>
<OnPlatform
x:TypeArguments="ImageSource"
iOS="default_campaign"
Android="default_campaign"
WinPhone="Assets/default_campaign.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="default_campaign" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/default_campaign.png" />
</OnPlatform>
</ffimageloading:CachedImage.LoadingPlaceholder>
<ffimageloading:CachedImage.ErrorPlaceholder>
<OnPlatform
x:TypeArguments="ImageSource"
iOS="noimage"
Android="noimage"
WinPhone="Assets/noimage.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="noimage" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/noimage.png" />
</OnPlatform>
</ffimageloading:CachedImage.ErrorPlaceholder>
</ffimageloading:CachedImage>
<!-- NAME -->


+ 9
- 11
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/ProductTemplate.xaml View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
@ -76,18 +76,16 @@
Source="{Binding PictureUri}"
Aspect="AspectFill">
<ffimageloading:CachedImage.LoadingPlaceholder>
<OnPlatform
x:TypeArguments="ImageSource"
iOS="default_product"
Android="default_product"
WinPhone="Assets/default_product.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="default_product" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/default_product.png" />
</OnPlatform>
</ffimageloading:CachedImage.LoadingPlaceholder>
<ffimageloading:CachedImage.ErrorPlaceholder>
<OnPlatform
x:TypeArguments="ImageSource"
iOS="noimage"
Android="noimage"
WinPhone="Assets/noimage.png"/>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS, Android" Value="noimage" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/noimage.png" />
</OnPlatform>
</ffimageloading:CachedImage.ErrorPlaceholder>
</ffimageloading:CachedImage>
<Grid


Loading…
Cancel
Save