diff --git a/PocketSharp.Examples/PocketSharp.WP8/App.xaml b/PocketSharp.Examples/PocketSharp.WP8/App.xaml index 15936fe..5cd5040 100644 --- a/PocketSharp.Examples/PocketSharp.WP8/App.xaml +++ b/PocketSharp.Examples/PocketSharp.WP8/App.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml b/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml index dbcbb88..413e6f6 100644 --- a/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml +++ b/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml @@ -14,59 +14,33 @@ SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="True"> - - - - - - + + + + + + - + + + + + - For example: - - Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" - - This binding points to the template's string resource named "ApplicationTitle". - - Adding supported languages in the Project Properties tab will create a - new resx file per language that can carry the translated values of your - UI strings. The binding in these examples will cause the value of the - attributes to be drawn from the .resx file that matches the - CurrentUICulture of the app at run time. - --> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml.cs b/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml.cs index 3ebd49a..f040153 100644 --- a/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml.cs +++ b/PocketSharp.Examples/PocketSharp.WP8/MainPage.xaml.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; +using Microsoft.Phone.Controls; +using PocketSharp.WP8.ViewModels; +using System; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; -using PocketSharp.WP8.Resources; -using PocketSharp.WP8.ViewModels; -using System.Threading.Tasks; namespace PocketSharp.WP8 { @@ -22,18 +16,12 @@ namespace PocketSharp.WP8 // Set the data context of the LongListSelector control to the sample data DataContext = App.ViewModel; - - // Sample code to localize the ApplicationBar - //BuildLocalizedApplicationBar(); } // Load data for the ViewModel Items - protected async override void OnNavigatedTo(NavigationEventArgs e) + protected override void OnNavigatedTo(NavigationEventArgs e) { - if (!App.ViewModel.IsDataLoaded) - { - await App.ViewModel.LoadData(); - } + } // Handle selection changed on LongListSelector @@ -50,20 +38,9 @@ namespace PocketSharp.WP8 MainLongListSelector.SelectedItem = null; } - // Sample code for building a localized ApplicationBar - //private void BuildLocalizedApplicationBar() - //{ - // // Set the page's ApplicationBar to a new instance of ApplicationBar. - // ApplicationBar = new ApplicationBar(); - - // // Create a new button and set the text value to the localized string from AppResources. - // ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative)); - // appBarButton.Text = AppResources.AppBarButtonText; - // ApplicationBar.Buttons.Add(appBarButton); - - // // Create a new menu item with the localized string from AppResources. - // ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText); - // ApplicationBar.MenuItems.Add(appBarMenuItem); - //} + private async void Button_Click(object sender, RoutedEventArgs e) + { + await App.ViewModel.LoadData(); + } } } \ No newline at end of file