From: gu.martinm@gmail.com Date: Fri, 3 Oct 2014 01:20:36 +0000 (+0200) Subject: WeatherInformation WP8: MapPage improvements X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=a960b8dd702f050f0d545bf8823c14d7bde6abba;p=CSharpForFun%2F.git WeatherInformation WP8: MapPage improvements --- 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 @@ +