From a960b8dd702f050f0d545bf8823c14d7bde6abba Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Fri, 3 Oct 2014 03:20:36 +0200 Subject: [PATCH] WeatherInformation WP8: MapPage improvements --- .../WeatherInformation/MainPage.xaml.cs | 19 ++ .../WeatherInformation/MapPage.xaml | 17 +- .../WeatherInformation/MapPage.xaml.cs | 310 +++++++++++++-------- .../WeatherInformation/Model/ReverseGeoCode.cs | 63 +++++ .../Model/Services/CustomHTTPClient.cs | 3 +- .../Properties/WMAppManifest.xml | 22 +- .../Resources/AppResources.Designer.cs | 36 ++- .../Resources/AppResources.es.resx | 16 +- .../Resources/AppResources.es.xlf | 20 +- .../Resources/AppResources.qps-ploc.xlf | 20 +- .../WeatherInformation/Resources/AppResources.resx | 16 +- .../WeatherInformation/SettingsPage.xaml | 8 + .../ViewModels/SettingsViewModel.cs | 51 +++- .../WeatherInformation/WeatherInformation.csproj | 2 + 14 files changed, 443 insertions(+), 160 deletions(-) create mode 100644 WindowsPhone/WP8/WeatherInformation/WeatherInformation/Model/ReverseGeoCode.cs diff --git a/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MainPage.xaml.cs b/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MainPage.xaml.cs index 8c2b9cf..90589a0 100644 --- a/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MainPage.xaml.cs +++ b/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MainPage.xaml.cs @@ -11,6 +11,7 @@ using WeatherInformation.Resources; using WeatherInformation.ViewModels; using System.Threading.Tasks; using WeatherInformation.Model.JsonDataParser; +using Microsoft.Phone.Shell; namespace WeatherInformation { @@ -36,6 +37,8 @@ namespace WeatherInformation { base.OnNavigatedTo(e); + CreateFlipTile(); + // If _isNewPageInstance is true, the page constuctor has been called, so // state may need to be restored. if (_isNewPageInstance) @@ -171,6 +174,22 @@ namespace WeatherInformation NavigationService.Navigate(new Uri("/SettingsPage.xaml", UriKind.Relative)); } + private void CreateFlipTile() + { + ShellTile tile = ShellTile.ActiveTiles.FirstOrDefault( + x => x.NavigationUri.ToString().Contains("flip")); + tile = ShellTile.ActiveTiles.First(); + var activeTiles = ShellTile.ActiveTiles; + + var tileData = new FlipTileData(); + tileData.Title = "GUSTAVO RULES"; + tileData.BackTitle = "Gustavo Rules Back"; + tileData.BackContent = "Gustavo Back Content"; + tileData.WideBackContent = "Gustavo Wid Back Content"; + tile.Update(tileData); + + } + // Código de ejemplo para compilar una ApplicationBar traducida //private void BuildLocalizedApplicationBar() //{ diff --git a/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MapPage.xaml b/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MapPage.xaml index 5c4bd37..20eeae5 100644 --- a/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MapPage.xaml +++ b/WindowsPhone/WP8/WeatherInformation/WeatherInformation/MapPage.xaml @@ -26,7 +26,17 @@ - + + + + + + + + + + + @@ -34,12 +44,15 @@ +