Repository: Windows-XAML/201505-MVA Branch: master Commit: 9d411df77337 Files: 939 Total size: 3.2 MB Directory structure: gitextract_q2xce2zl/ ├── .gitattributes ├── .gitignore ├── ActionCenterDemo/ │ ├── ActionCenterDemo/ │ │ ├── ActionCenterDemo.csproj │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ ├── ApplicationBase.cs │ │ │ └── MVVM.cs │ │ ├── Converters/ │ │ │ ├── BoolToColorConverter.cs │ │ │ └── CountToVisibilityConverter.cs │ │ ├── Models/ │ │ │ ├── MessageItem.cs │ │ │ └── ToastParams.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Repositories/ │ │ │ └── MessageItemRepository.cs │ │ ├── Services/ │ │ │ ├── DispatcherService.cs │ │ │ ├── NavigationService.cs │ │ │ └── TileServices.cs │ │ ├── ViewModels/ │ │ │ ├── DetailPageViewModel.cs │ │ │ └── MainPageViewModel.cs │ │ ├── Views/ │ │ │ ├── DetailPage.xaml │ │ │ ├── DetailPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ ├── ActionCenterDemo.sln │ └── ActionCenterHistoryChangedTask/ │ ├── ActionCenterChangedBackgroundTask.cs │ ├── ActionCenterHistoryChangedTask.csproj │ ├── MessageItem.cs │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── ToastParams.cs │ └── packages.config ├── Adaptive UI/ │ └── Blank10/ │ └── Views/ │ └── MainPage.xaml ├── AdaptiveCode/ │ └── VisibleBoundsDemo/ │ ├── VisibleBoundsDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Triggers/ │ │ │ └── DeviceFamilyTrigger.cs │ │ └── VisibleBoundsDemo.csproj │ └── VisibleBoundsDemo.sln ├── AdaptiveUI/ │ ├── AdaptiveUI/ │ │ ├── AdaptiveUI-Blank.csproj │ │ ├── AdaptiveUI.sln │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Controls/ │ │ │ └── AutoNavButton.cs │ │ ├── Extensions/ │ │ │ └── WeakEvent.cs │ │ ├── Model/ │ │ │ └── SampleInfo.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Themes/ │ │ │ └── Generic.xaml │ │ ├── Triggers/ │ │ │ ├── ApiInformationTrigger.cs │ │ │ ├── ControlSizeTrigger.cs │ │ │ ├── DeviceFamilyTrigger.cs │ │ │ ├── InputTypeTrigger.cs │ │ │ ├── InteractionModeTrigger.cs │ │ │ ├── NetworkAvailableStateTrigger.cs │ │ │ └── OrientationTrigger.cs │ │ ├── Views/ │ │ │ ├── ApiInformationPage.xaml │ │ │ ├── ApiInformationPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── OrientationPage.xaml │ │ │ ├── OrientationPage.xaml.cs │ │ │ ├── WindowSizePage.xaml │ │ │ └── WindowSizePage.xaml.cs │ │ └── packages.config │ └── AdaptiveUI.sln ├── AppService/ │ └── AppService_EncoderDecoder/ │ ├── AppService_EncoderDecoder.sln │ ├── ClientApp/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── ClientApp.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ └── packages.config │ ├── ServerApp/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── ServerApp.csproj │ │ └── packages.config │ └── TextEncoderComponent/ │ ├── EncoderDecoderTask.cs │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── TextEncoderComponent.csproj │ └── packages.config ├── AppServicesDemo/ │ ├── SimpleCalculatorAppService/ │ │ ├── AppServicesClientApp/ │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cs │ │ │ ├── AppServicesClientApp.csproj │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── Package.appxmanifest │ │ │ └── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── AppServicesDemo/ │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cs │ │ │ ├── AppServicesDemo.csproj │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── Package.appxmanifest │ │ │ └── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── AppServicesDemoTask/ │ │ │ ├── AppServiceTask.cs │ │ │ ├── AppServicesDemoTask.csproj │ │ │ └── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── SimpleCalculatorAppServicesDemo.sln │ └── SynonymsAppServiceDemo/ │ ├── AppServicesClientApp/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AppServicesClientApp.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── AppServicesDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AppServicesDemo.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ └── Properties/ │ │ └── AssemblyInfo.cs │ ├── AppServicesDemo.sln │ ├── AppServicesDemoTask/ │ │ ├── AppServiceTask.cs │ │ ├── AppServicesDemoTask.csproj │ │ └── Properties/ │ │ └── AssemblyInfo.cs │ ├── SynonymsService/ │ │ ├── BingSynonymsResponse.cs │ │ ├── JSONHelper.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── SynonymApi.cs │ │ ├── SynonymsService.csproj │ │ └── SynonymsServiceTask.cs │ └── SynonymsServiceClientLibrary/ │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── SynonymsServiceClient.cs │ ├── SynonymsServiceClientLibrary.csproj │ ├── SynonymsServiceResponse.cs │ └── packages.config ├── AzureMobileApps/ │ ├── UWPDevMVA_Runtime/ │ │ ├── UWPDevMVA.sln │ │ └── UWPDevMVAService/ │ │ ├── App_Start/ │ │ │ └── WebApiConfig.cs │ │ ├── Controllers/ │ │ │ └── TodoItemController.cs │ │ ├── DataObjects/ │ │ │ └── TodoItem.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Models/ │ │ │ └── UWPDevMVAContext.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── UWPDevMVAService.csproj │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── packages.config │ └── UWPDevMVA_Windows_CS/ │ ├── UWPDevMVA/ │ │ └── UWPDevMVA.WindowsPhone/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── DataModel/ │ │ │ └── TodoItem.cs │ │ ├── MainPage.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── UWPDevMVA.UWP.csproj │ │ ├── app.config │ │ └── packages.config │ └── UWPDevMVA.sln ├── BackgroundExecution/ │ ├── BackgroundExecution.sln │ ├── BackgroundTask/ │ │ ├── BackgroundTask.csproj │ │ ├── MyUpdateBadgeTask.cs │ │ ├── MyUpdateTileTask.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ └── ForegroundApp/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── ApplicationInsights.config │ ├── Common/ │ │ ├── BackgroundHelper.cs │ │ └── BootStrapper.cs │ ├── Converters/ │ │ ├── DateTimeFormatConverter.cs │ │ └── ValueWhenConverter.cs │ ├── ForegroundApp.csproj │ ├── Models/ │ │ ├── Models.readme.htm │ │ ├── TodoItem.cs │ │ └── TodoList.cs │ ├── Mvvm/ │ │ ├── BindableBase.cs │ │ ├── Command.cs │ │ └── ViewModelBase.cs │ ├── Package.appxmanifest │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Repositories/ │ │ ├── TodoItemRepository.cs │ │ └── TodoListRepository.cs │ ├── Services/ │ │ ├── FileService/ │ │ │ ├── FileHelper.cs │ │ │ └── FileService.cs │ │ └── NavigationService/ │ │ ├── INavigatable.cs │ │ ├── NavigationEventArgs.cs │ │ ├── NavigationFacade.cs │ │ └── NavigationService.cs │ ├── Styles/ │ │ └── StarRadioButtonStyle.xaml │ ├── ViewModels/ │ │ ├── MainPageViewModel.cs │ │ ├── TodoItemViewModel.cs │ │ └── TodoListViewModel.cs │ ├── Views/ │ │ ├── MainPage.xaml │ │ └── MainPage.xaml.cs │ └── packages.config ├── Cortana/ │ ├── CortanaTodo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── CortanaTodo.csproj │ │ ├── Extensions/ │ │ │ └── WeakEvent.cs │ │ ├── Mvvm/ │ │ │ ├── CommandCollection.cs │ │ │ ├── CommandHelper.cs │ │ │ ├── DynamicCommand.cs │ │ │ ├── ViewModel.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Services/ │ │ │ ├── Lifecycle/ │ │ │ │ └── ILifecycleAware.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigationAware.cs │ │ │ ├── NavigationEventArgsEx.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── ViewModels/ │ │ │ └── MainPageViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ ├── VoiceCommands.xml │ │ └── packages.config │ ├── CortanaTodo.Background/ │ │ ├── CortanaTodo.Background.csproj │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── VoiceCommandService.cs │ │ └── packages.config │ ├── CortanaTodo.Shared/ │ │ ├── CortanaTodo.Shared.csproj │ │ ├── Models/ │ │ │ ├── BindableBase.cs │ │ │ ├── DataObject.cs │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ ├── TaskHelper.cs │ │ │ └── TodoService.cs │ │ └── packages.config │ └── CortanaTodo.sln ├── DragAndDropSample/ │ ├── DragAndDropSample/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── DragAndDropSample.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ └── packages.config │ └── DragAndDropSample.sln ├── HelloWorld/ │ └── HelloWorld/ │ ├── Services/ │ │ └── AdService/ │ │ ├── AdHelper.cs │ │ └── AdService.cs │ └── ViewModels/ │ └── MainPageViewModel.cs ├── HttpClient WireSerialization/ │ ├── NorthwindService/ │ │ ├── Category.cs │ │ ├── Customer.cs │ │ ├── Employee.cs │ │ ├── Northwind.Context.cs │ │ ├── Northwind.Context.tt │ │ ├── Northwind.Designer.cs │ │ ├── Northwind.cs │ │ ├── Northwind.edmx │ │ ├── Northwind.edmx.diagram │ │ ├── Northwind.svc │ │ ├── Northwind.svc.cs │ │ ├── Northwind.tt │ │ ├── NorthwindService.csproj │ │ ├── Order.cs │ │ ├── Order_Detail.cs │ │ ├── Product.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Shipper.cs │ │ ├── Supplier.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── packages.config │ ├── UWPclient/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── UWPclient.csproj │ │ └── packages.config │ └── WireSerialization.sln ├── KeepTheKeys/ │ ├── KeepTheKeys/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── DevicePage.xaml │ │ ├── DevicePage.xaml.cs │ │ ├── KeepTheKeys.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── RadioButtonValueConverter.cs │ ├── KeepTheKeys.sln │ ├── KeepTheKeysBackground/ │ │ ├── KeepTheKeysBackground.csproj │ │ ├── KeyFobTask.cs │ │ └── Properties/ │ │ └── AssemblyInfo.cs │ ├── KeepTheKeysCommon/ │ │ ├── AlertLevel.cs │ │ ├── KeepTheKeysCommon.csproj │ │ ├── KeyFob.cs │ │ └── Properties/ │ │ └── AssemblyInfo.cs │ └── Notes.txt ├── LaunchForResultsDemo/ │ ├── LaunchForResultsDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ ├── NavigationHelper.cs │ │ │ ├── ObservableDictionary.cs │ │ │ ├── RelayCommand.cs │ │ │ └── SuspensionManager.cs │ │ ├── ContinuationPage.xaml │ │ ├── ContinuationPage.xaml.cs │ │ ├── LaunchForResultsDemo.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ └── Properties/ │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── LaunchForResultsDemo.sln │ └── LaunchTargetDemoApp/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── ApplicationInsights.config │ ├── LaunchTargetDemoApp.csproj │ ├── LaunchTargetPage.xaml │ ├── LaunchTargetPage.xaml.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ └── Properties/ │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── LaunchForResultsShoppingDemo/ │ ├── CheckOut/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── CheckOut.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── MakePayment.xaml │ │ ├── MakePayment.xaml.cs │ │ ├── Models/ │ │ │ └── Item.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── LaunchForResultsShoppingDemo.sln │ └── Shop/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── Receipt.xaml │ ├── Receipt.xaml.cs │ ├── Shop.csproj │ ├── ViewModels/ │ │ ├── CanNotifyPropertyChanged.cs │ │ ├── Command.cs │ │ ├── MainPageViewModel.cs │ │ ├── Product.cs │ │ └── ViewModelLocator.cs │ └── packages.config ├── MapsDrawingShapes/ │ ├── DrawingShapes/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── DrawingShapes.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── MapElementData.cs │ │ ├── MapExtensions.cs │ │ ├── Package.appxmanifest │ │ ├── PointList.cs │ │ └── Properties/ │ │ └── AssemblyInfo.cs │ └── DrawingShapes.sln ├── MigrationDemo/ │ ├── Begin/ │ │ └── ContosoCookbook/ │ │ ├── ContosoCookbook/ │ │ │ ├── AboutPage.xaml │ │ │ ├── AboutPage.xaml.cs │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cs │ │ │ ├── Common/ │ │ │ │ ├── NavigationHelper.cs │ │ │ │ ├── ObservableDictionary.cs │ │ │ │ ├── ReadMe.txt │ │ │ │ ├── RelayCommand.cs │ │ │ │ └── SuspensionManager.cs │ │ │ ├── ContosoCookbook.csproj │ │ │ ├── Converters/ │ │ │ │ ├── ImageSourceToStringConverter.cs │ │ │ │ └── UserImagesDisplayConverter.cs │ │ │ ├── Data/ │ │ │ │ └── Recipes.txt │ │ │ ├── DataModel/ │ │ │ │ ├── BindableBase.cs │ │ │ │ ├── RecipeDataSource.cs │ │ │ │ └── SampleDataSource.cs │ │ │ ├── GroupDetailPage.xaml │ │ │ ├── GroupDetailPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── Package.appxmanifest │ │ │ ├── Properties/ │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── RecipeDetailPage.xaml │ │ │ ├── RecipeDetailPage.xaml.cs │ │ │ └── Strings/ │ │ │ └── en-US/ │ │ │ └── Resources.resw │ │ └── ContosoCookbook.sln │ ├── Controls/ │ │ ├── BackButton.xaml │ │ └── BackButton.xaml.cs │ └── End/ │ └── ContosoCookbook/ │ ├── ContosoCookbook/ │ │ ├── AboutPage.xaml │ │ ├── AboutPage.xaml.cs │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ ├── NavigationHelper.cs │ │ │ ├── ObservableDictionary.cs │ │ │ ├── ReadMe.txt │ │ │ ├── RelayCommand.cs │ │ │ └── SuspensionManager.cs │ │ ├── ContosoCookbook.csproj │ │ ├── Controls/ │ │ │ ├── BackButton.xaml │ │ │ └── BackButton.xaml.cs │ │ ├── Converters/ │ │ │ ├── ImageSourceToStringConverter.cs │ │ │ └── UserImagesDisplayConverter.cs │ │ ├── Data/ │ │ │ └── Recipes.txt │ │ ├── DataModel/ │ │ │ ├── BindableBase.cs │ │ │ ├── RecipeDataSource.cs │ │ │ └── SampleDataSource.cs │ │ ├── GroupDetailPage.xaml │ │ ├── GroupDetailPage.xaml.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── RecipeDetailPage.xaml │ │ ├── RecipeDetailPage.xaml.cs │ │ └── Strings/ │ │ └── en-US/ │ │ └── Resources.resw │ └── ContosoCookbook.sln ├── Navigation/ │ └── Blank1/ │ ├── ViewModels/ │ │ └── Page2ViewModel.cs │ └── Views/ │ └── MainPage.xaml.cs ├── Performance/ │ ├── Performance/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Models/ │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Performance.csproj │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ └── TodoItemRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── ViewModels/ │ │ │ ├── IncrementalAccessPageViewModel.cs │ │ │ ├── RandomAccessPageViewModel.cs │ │ │ └── TodoItemViewModel.cs │ │ ├── Views/ │ │ │ ├── DeferedPhasePage.xaml │ │ │ ├── DeferedPhasePage.xaml.cs │ │ │ ├── IncrementalAccessPage.xaml │ │ │ ├── IncrementalAccessPage.xaml.cs │ │ │ ├── RandomAccessPage.xaml │ │ │ ├── RandomAccessPage.xaml.cs │ │ │ ├── ShellPage.xaml │ │ │ └── ShellPage.xaml.cs │ │ ├── Virtualize/ │ │ │ ├── IProvider.cs │ │ │ ├── IncrementalList.cs │ │ │ ├── ObservableVector.cs │ │ │ ├── RandomAccessList - Copy.cs │ │ │ ├── RandomAccessList.cs │ │ │ └── TodoItemViewModelProvider.cs │ │ └── packages.config │ └── Performance.sln ├── ProtocolHandlerDemo/ │ ├── FirstProtocolHandler/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── FirstProtocolHandler.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ └── packages.config │ ├── ProtocolHandlerDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── ProtocolHandlerDemo.csproj │ │ └── packages.config │ ├── ProtocolHandlerDemo.sln │ └── SecondProtocolHandler/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── ApplicationInsights.config │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── SecondProtocolHandler.csproj │ └── packages.config ├── PushTriggerSample/ │ ├── PushTriggerBackgroundTask/ │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── PushTriggerBackgroundTask.csproj │ │ ├── RawTriggerTask.cs │ │ └── packages.config │ ├── PushTriggerSample/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── Converters.readme.htm │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Helpers/ │ │ │ └── PushHandlingHelper.cs │ │ ├── Models/ │ │ │ ├── Models.readme.htm │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── PushTriggerSample.csproj │ │ ├── Repositories/ │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ └── PushTriggerSample.sln ├── README.md ├── RoamingSettingsDemo/ │ ├── RoamingSettingsDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── RoamingSettingsDemo.csproj │ │ ├── Services/ │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ └── RoamingSettingsDemo.sln ├── SQLiteDemo/ │ ├── SQLiteDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ ├── NavigationHelper.cs │ │ │ ├── ObservableDictionary.cs │ │ │ ├── ReadMe.txt │ │ │ ├── RelayCommand.cs │ │ │ └── SuspensionManager.cs │ │ ├── Converters/ │ │ │ └── DateTimeToStringConverter.cs │ │ ├── CreateDatabase.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── ProjectsPage.xaml │ │ ├── ProjectsPage.xaml.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── SQLiteDemo.csproj │ │ ├── ViewModels/ │ │ │ ├── Customer.cs │ │ │ ├── CustomersViewModel.cs │ │ │ ├── Project.cs │ │ │ ├── ProjectsViewModel.cs │ │ │ ├── TableViewModelBase.cs │ │ │ └── ViewModelBase.cs │ │ └── packages.config │ └── SQLiteDemo.sln ├── ShareContractExample/ │ ├── ContosoCookbook/ │ │ ├── AboutPage.xaml │ │ ├── AboutPage.xaml.cs │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ ├── NavigationHelper.cs │ │ │ ├── ObservableDictionary.cs │ │ │ ├── ReadMe.txt │ │ │ ├── RelayCommand.cs │ │ │ └── SuspensionManager.cs │ │ ├── ContosoCookbook.csproj │ │ ├── Converters/ │ │ │ ├── ImageSourceToStringConverter.cs │ │ │ └── UserImagesDisplayConverter.cs │ │ ├── Data/ │ │ │ └── Recipes.txt │ │ ├── DataModel/ │ │ │ ├── BindableBase.cs │ │ │ ├── RecipeDataSource.cs │ │ │ └── SampleDataSource.cs │ │ ├── GroupDetailPage.xaml │ │ ├── GroupDetailPage.xaml.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── RecipeDetailPage.xaml │ │ ├── RecipeDetailPage.xaml.cs │ │ └── Strings/ │ │ └── en-US/ │ │ └── Resources.resw │ └── ContosoCookbook.sln ├── SimplePushDemo/ │ ├── SimplePushDemo/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Helpers/ │ │ │ └── PushHandlingHelper.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Services/ │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── SimplePushDemo.csproj │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ └── SimplePushDemo.sln ├── SplashScreen/ │ └── SplashScreen/ │ ├── SplashScreen-Blank/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── SplashScreen-Blank.csproj │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── Splash.xaml │ │ │ └── Splash.xaml.cs │ │ └── packages.config │ ├── SplashScreen-Template10/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Services/ │ │ │ └── NavigationService/ │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── SplashScreen-Template10.csproj │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── Splash.xaml │ │ │ └── Splash.xaml.cs │ │ └── packages.config │ └── SplashScreen.sln ├── SplitView/ │ ├── SplitView/ │ │ ├── SplitView-Blank/ │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cs │ │ │ ├── Mvvm/ │ │ │ │ └── Command.cs │ │ │ ├── Package.appxmanifest │ │ │ ├── Properties/ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ └── Default.rd.xml │ │ │ ├── SplitView-Blank.csproj │ │ │ └── Views/ │ │ │ ├── AboutPage.xaml │ │ │ ├── AboutPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── PrivacyPage.xaml │ │ │ ├── PrivacyPage.xaml.cs │ │ │ ├── SettingsPage.xaml │ │ │ ├── SettingsPage.xaml.cs │ │ │ ├── Shell.xaml │ │ │ └── Shell.xaml.cs │ │ └── SplitView-Template10/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Services/ │ │ │ ├── KeyboardService/ │ │ │ │ ├── KeyboardEventArgs.cs │ │ │ │ ├── KeyboardHelper.cs │ │ │ │ └── KeyboardService.cs │ │ │ └── NavigationService/ │ │ │ ├── FrameFacade.cs │ │ │ ├── INavigatable.cs │ │ │ ├── NavigatedEventArgs.cs │ │ │ ├── NavigatingEventArgs.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── SplitView-Template10.csproj │ │ ├── Styles/ │ │ │ └── SplitViewStyles.xaml │ │ ├── Views/ │ │ │ ├── AboutPage.xaml │ │ │ ├── AboutPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── PrivacyPage.xaml │ │ │ ├── PrivacyPage.xaml.cs │ │ │ ├── SettingsPage.xaml │ │ │ ├── SettingsPage.xaml.cs │ │ │ ├── Shell.xaml │ │ │ └── Shell.xaml.cs │ │ └── packages.config │ └── SplitView.sln ├── SuspendResume/ │ ├── Blank1/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Blank1.csproj │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Services/ │ │ │ ├── KeyboardService/ │ │ │ │ ├── KeyboardEventArgs.cs │ │ │ │ ├── KeyboardHelper.cs │ │ │ │ └── KeyboardService.cs │ │ │ └── NavigationService/ │ │ │ ├── FrameFacade.cs │ │ │ ├── INavigatable.cs │ │ │ ├── NavigatedEventArgs.cs │ │ │ ├── NavigatingEventArgs.cs │ │ │ └── NavigationService.cs │ │ ├── ViewModels/ │ │ │ ├── DetailsPageViewModel.cs │ │ │ └── MainPageViewModel.cs │ │ ├── Views/ │ │ │ ├── DetailsPage.xaml │ │ │ ├── DetailsPage.xaml.cs │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ └── SuspendResume.sln ├── TODOFileHandlingSample/ │ ├── TODOFileHandlingSample/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── Converters.readme.htm │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Models/ │ │ │ ├── Models.readme.htm │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ ├── PivotTabsStyle.xaml │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── TODOFileHandlingSample.csproj │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── ToDoEditorContentDialog.xaml │ │ │ └── ToDoEditorContentDialog.xaml.cs │ │ └── packages.config │ └── TODOFileHandlingSample.sln ├── TODOFilePickerSample/ │ ├── TODOFilePickerSample/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── Converters.readme.htm │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Models/ │ │ │ ├── Models.readme.htm │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ ├── PivotTabsStyle.xaml │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── TODOFilePickerSample.csproj │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── ToDoEditorContentDialog.xaml │ │ │ └── ToDoEditorContentDialog.xaml.cs │ │ └── packages.config │ └── TODOFilePickerSample.sln ├── TODOPivot/ │ ├── TODOPivot/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── Converters.readme.htm │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Models/ │ │ │ ├── Models.readme.htm │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ ├── PivotTabsStyle.xaml │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── TODOPivot.csproj │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── ToDoEditorContentDialog.xaml │ │ │ └── ToDoEditorContentDialog.xaml.cs │ │ └── packages.config │ └── TODOPivot.sln ├── TODOSQLiteSample/ │ ├── TODOSQLiteSample/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── Converters.readme.htm │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── Models/ │ │ │ ├── Models.readme.htm │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ ├── TableSQLiteRepoBase.cs │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ ├── NavigationService/ │ │ │ │ ├── INavigatable.cs │ │ │ │ ├── NavigationEventArgs.cs │ │ │ │ ├── NavigationFacade.cs │ │ │ │ └── NavigationService.cs │ │ │ └── SQLiteService/ │ │ │ └── SQLiteService.cs │ │ ├── Styles/ │ │ │ ├── PivotTabsStyle.xaml │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── TODOSQLiteSample.csproj │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cs │ │ │ ├── ToDoEditorContentDialog.xaml │ │ │ └── ToDoEditorContentDialog.xaml.cs │ │ └── packages.config │ └── TODOSQLiteSample.sln ├── VideoInterstitialAd/ │ ├── HelloWorld/ │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── ApplicationInsights.config │ │ ├── Common/ │ │ │ └── BootStrapper.cs │ │ ├── Converters/ │ │ │ ├── DateTimeFormatConverter.cs │ │ │ └── ValueWhenConverter.cs │ │ ├── HelloWorld.csproj │ │ ├── Models/ │ │ │ ├── TodoItem.cs │ │ │ └── TodoList.cs │ │ ├── Mvvm/ │ │ │ ├── BindableBase.cs │ │ │ ├── Command.cs │ │ │ └── ViewModelBase.cs │ │ ├── Package.appxmanifest │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── Repositories/ │ │ │ ├── TodoItemRepository.cs │ │ │ └── TodoListRepository.cs │ │ ├── Services/ │ │ │ ├── AdService/ │ │ │ │ ├── AdHelper.cs │ │ │ │ └── AdService.cs │ │ │ ├── FileService/ │ │ │ │ ├── FileHelper.cs │ │ │ │ └── FileService.cs │ │ │ ├── InAppPurchaseService/ │ │ │ │ ├── InAppPurchaseHelper.cs │ │ │ │ └── InAppPurchaseService.cs │ │ │ └── NavigationService/ │ │ │ ├── INavigatable.cs │ │ │ ├── NavigationEventArgs.cs │ │ │ ├── NavigationFacade.cs │ │ │ └── NavigationService.cs │ │ ├── Styles/ │ │ │ └── StarRadioButtonStyle.xaml │ │ ├── ViewModels/ │ │ │ ├── MainPageViewModel.cs │ │ │ ├── TodoItemViewModel.cs │ │ │ └── TodoListViewModel.cs │ │ ├── Views/ │ │ │ ├── MainPage.xaml │ │ │ └── MainPage.xaml.cs │ │ └── packages.config │ └── HelloWorld.sln └── XamlControls/ ├── XamlControls-Blank/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── Models/ │ │ ├── MenuItem.cs │ │ ├── TodoItem.cs │ │ └── TodoList.cs │ ├── Mvvm/ │ │ ├── BindableBase.cs │ │ └── Command.cs │ ├── Package.appxmanifest │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── ViewModels/ │ │ └── SampleViewModel.cs │ ├── Views/ │ │ ├── GeometryControls.xaml │ │ ├── GeometryControls.xaml.cs │ │ ├── InputControls.xaml │ │ ├── InputControls.xaml.cs │ │ ├── ItemsControls.xaml │ │ ├── ItemsControls.xaml.cs │ │ ├── LayoutControls.xaml │ │ ├── LayoutControls.xaml.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Transforms.xaml │ │ └── Transforms.xaml.cs │ └── XamlControls-Blank.csproj └── XamlControls.sln ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ ############################################################################### # Set default behavior to automatically normalize line endings. ############################################################################### * text=auto ############################################################################### # Set default behavior for command prompt diff. # # This is need for earlier builds of msysgit that does not have it on by # default for csharp files. # Note: This is only used by command line ############################################################################### #*.cs diff=csharp ############################################################################### # Set the merge driver for project and solution files # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS # the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below ############################################################################### #*.sln merge=binary #*.csproj merge=binary #*.vbproj merge=binary #*.vcxproj merge=binary #*.vcproj merge=binary #*.dbproj merge=binary #*.fsproj merge=binary #*.lsproj merge=binary #*.wixproj merge=binary #*.modelproj merge=binary #*.sqlproj merge=binary #*.wwaproj merge=binary ############################################################################### # behavior for image files # # image files are treated as binary by default. ############################################################################### #*.jpg binary #*.png binary #*.gif binary ############################################################################### # diff behavior for common document formats # # Convert binary document formats to text before diffing them. This feature # is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain #*.DOC diff=astextplain #*.docx diff=astextplain #*.DOCX diff=astextplain #*.dot diff=astextplain #*.DOT diff=astextplain #*.pdf diff=astextplain #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ build/ bld/ [Bb]in/ [Oo]bj/ # Visual Studo 2015 cache/options directory .vs/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opensdf *.sdf *.cachefile # Visual Studio profiler *.psess *.vsp *.vspx # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding addin-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch _NCrunch_* .*crunch*.local.xml # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore # **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # Windows Azure Build Output csx/ *.build.csdef # Windows Store app package directory AppPackages/ # Others *.[Cc]ache ClientBin/ [Ss]tyle[Cc]op.* ~$* *~ *.dbmdl *.dbproj.schemaview *.pfx *.publishsettings node_modules/ bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files *.mdf *.ldf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings # Microsoft Fakes FakesAssemblies/ # Node.js Tools for Visual Studio .ntvs_analysis.dat # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt ################# ## Eclipse ################# *.pydevproject .project .metadata bin/ tmp/ *.tmp *.bak *.swp *~.nib local.properties .classpath .settings/ .loadpath # External tool builders .externalToolBuilders/ # Locally stored "Eclipse launch configurations" *.launch # CDT-specific .cproject # PDT-specific .buildpath ################# ## Visual Studio ################# ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.sln.docstates # Build results [Dd]ebug/ [Rr]elease/ x64/ build/ [Bb]in/ [Oo]bj/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* *_i.c *_p.c *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.log *.scc # Visual C++ cache files ipch/ *.aps *.ncb *.opensdf *.sdf *.cachefile # Visual Studio profiler *.psess *.vsp *.vspx # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch *.ncrunch* .*crunch*.local.xml # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.Publish.xml *.pubxml *.publishproj # NuGet Packages Directory ## TODO: If you have NuGet Package Restore enabled, uncomment the next line #packages/ # Windows Azure Build Output csx *.build.csdef # Windows Store app package directory AppPackages/ # Others sql/ *.Cache ClientBin/ [Ss]tyle[Cc]op.* ~$* *~ *.dbmdl *.[Pp]ublish.xml *.pfx *.publishsettings # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file to a newer # Visual Studio version. Backup files are not needed, because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files App_Data/*.mdf App_Data/*.ldf ############# ## Windows detritus ############# # Windows image file caches Thumbs.db ehthumbs.db # Folder config file Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Mac crap .DS_Store ############# ## Python ############# *.py[cod] # Packages *.egg *.egg-info dist/ build/ eggs/ parts/ var/ sdist/ develop-eggs/ .installed.cfg # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox #Translations *.mo #Mr Developer .mr.developer.cfg **/packages/ ================================================ FILE: ActionCenterDemo/ActionCenterDemo/ActionCenterDemo.csproj ================================================  Debug AnyCPU {ED4B4052-AE0D-44FA-B8C2-FE47919E9A90} AppContainerExe Properties ActionCenterDemo ActionCenterDemo en-US UAP 10.0.10069.0 10.0.10069.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Template10_TemporaryKey.pfx true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true App.xaml DetailPage.xaml MainPage.xaml Designer MSBuild:Compile Designer ..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.dll ..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Extras.dll ..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Platform.dll ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll ..\packages\Newtonsoft.Json.6.0.8\lib\netcore45\Newtonsoft.Json.dll MSBuild:Compile Designer Designer MSBuild:Compile {5680fb19-c161-46d2-a1ae-115954e020cf} ActionCenterHistoryChangedTask 14.0 ================================================ FILE: ActionCenterDemo/ActionCenterDemo/App.xaml ================================================ ================================================ FILE: ActionCenterDemo/ActionCenterDemo/App.xaml.cs ================================================ using System.Threading.Tasks; using Windows.ApplicationModel.Activation; namespace ActionCenterDemo { sealed partial class App : Common.ApplicationBase { public App() : base() { this.InitializeComponent(); } protected override Task OnLaunchedAsync(LaunchActivatedEventArgs e) { // first launch navigation this.NavigationService.Navigate(typeof(Views.MainPage)); return base.OnLaunchedAsync(e); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Common/ApplicationBase.cs ================================================ using System; using System.Linq; using Windows.UI.Xaml; using System.Threading.Tasks; using Windows.ApplicationModel; using Windows.UI.Xaml.Controls; using Windows.ApplicationModel.Activation; namespace ActionCenterDemo.Common { // ApplicationBase is a drop-in replacement of Application // - OnInitializeAsync is the first in the pipeline, if launching // - OnLaunched[*]Async is required, and second in the pipeline // - OnActivated[*]Async is first in the pipeline, if activating // - NavigationService is an automatic property of this class public abstract partial class ApplicationBase : Application { public ApplicationBase() { this.Resuming += (s, e) => HandleResuming(s, e); this.Suspending += async (s, e) => { var deferral = e.SuspendingOperation.GetDeferral(); this.NavigationService.Suspending(); await HandleSuspendingAsync(s, e); deferral.Complete(); }; } public Services.NavigationService NavigationService { get; private set; } protected virtual void HandleResuming(object s, object e) { } protected virtual Task HandleSuspendingAsync(object s, SuspendingEventArgs e) { return Task.FromResult(null); } public Frame RootFrame { get; set; } protected Func SplashFactory { get; set; } protected virtual Task OnInitializeAsync() { return Task.FromResult(null); } protected virtual Task OnActivatedAsync(IActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnActivatedByProtocolAsync(ProtocolActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnActivatedByPrimaryTileAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnActivatedBySecondaryTileAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnActivatedByToastNotificationAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected override async void OnActivated(IActivatedEventArgs e) { switch (e.Kind) { // See http://go.microsoft.com/fwlink/?LinkID=288842 case ActivationKind.Launch: var args = e as LaunchActivatedEventArgs; if (args.TileId == "App" && !args.Arguments.Any()) { await OnActivatedByPrimaryTileAsync(args); } else if (args.TileId == "App" && args.Arguments.Any()) { await OnActivatedBySecondaryTileAsync(args); } else { await OnActivatedByToastNotificationAsync(args); } break; case ActivationKind.Protocol: case ActivationKind.ProtocolForResults: await OnActivatedByProtocolAsync(e as ProtocolActivatedEventArgs); break; default: break; } // this is to handle any other type of activation await this.OnActivatedAsync(e); Window.Current.Activate(); } protected virtual Task OnLaunchedAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnLaunchedByProtocolAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnLaunchedByPrimaryTileAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnLaunchedBySecondaryTileAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected virtual Task OnLaunchedByToastNotificationAsync(LaunchActivatedEventArgs e) { return Task.FromResult(null); } protected override async void OnLaunched(LaunchActivatedEventArgs e) { if (this.SplashFactory != null) { Window.Current.Content = this.SplashFactory(e.SplashScreen); Window.Current.Activate(); Window.Current.Content = null; } this.RootFrame = this.RootFrame ?? new Frame(); this.RootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; this.NavigationService = new Services.NavigationService(this.RootFrame); // the user may override to set custom content await OnInitializeAsync(); // if the user didn't set custom content, use frame if (Window.Current.Content == null) { Window.Current.Content = this.RootFrame; } if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { try { /* TODO: restore state */ } catch { /* TODO: handle fail */ } } else { switch (e.Kind) { // See http://go.microsoft.com/fwlink/?LinkID=288842 case ActivationKind.Launch: if (e.TileId == "App" && !e.Arguments.Any()) { await OnLaunchedByPrimaryTileAsync(e); } else if (e.TileId == "App" && e.Arguments.Any()) { await OnLaunchedByToastNotificationAsync(e); } else { await OnLaunchedBySecondaryTileAsync(e); } break; case ActivationKind.ProtocolForResults: case ActivationKind.Protocol: await OnLaunchedByProtocolAsync(e); break; default: break; } // this is to handle any other type of launch await this.OnLaunchedAsync(e); } Window.Current.Activate(); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Common/MVVM.cs ================================================ using System; using System.Collections.Generic; using Windows.UI.Xaml.Navigation; namespace ActionCenterDemo.Common { // this is an MVVM abstraction, allowing for any MVVM framework to be used // the default implementation is MVVM light, but it is not required // command is an implementation ICommand for buttons public class Command : GalaSoft.MvvmLight.Command.RelayCommand { public Command(Action execute) : base(execute) { } public Command(Action execute, Func canExecute) : base(execute, canExecute) { } } // command is an implementation of ICommand with parameters for buttons public class Command : GalaSoft.MvvmLight.Command.RelayCommand { public Command(Action execute) : base(execute) { } public Command(Action execute, Func canExecute) : base(execute, canExecute) { } } // viewmodelbase enables To/From, called by NavigationService public abstract class ViewModelBase : GalaSoft.MvvmLight.ViewModelBase { public virtual void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state) { } public virtual void OnNavigatedFrom(Dictionary state, bool suspending) { } } // imessage is what messenger sends public interface IMessage { } // message is a generic implementation of imessage public class Message : IMessage { public T Payload { get; set; } } // use messenger to communicate between viewmodels public class Messenger : GalaSoft.MvvmLight.Messaging.Messenger { public void Subscribe(object recipient, Action action) where T : IMessage { base.Register(recipient, action); } public void Unsubscribe(object recipient) where T : IMessage { base.Unregister(recipient); } public void Publish(T message) where T : IMessage { base.Send(message); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Converters/BoolToColorConverter.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI; using Windows.UI.Xaml.Data; namespace ActionCenterDemo.Converters { public class BoolToColorConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { if (value is Boolean) { return (bool)value ? Colors.Blue : Colors.Red; }; return null; } public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Converters/CountToVisibilityConverter.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml; using Windows.UI.Xaml.Data; namespace ActionCenterDemo.Converters { public class CountToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { return (int)value == 0 ? Visibility.Collapsed : Visibility.Visible; } public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Models/MessageItem.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ActionCenterDemo.Models { public sealed class MessageItem { public string ID { get; set; } public string Title { get; set; } public string Body { get; set; } public bool IsRead { get; set; } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Models/ToastParams.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ActionCenterDemo { class ToastParams { public string type { get; set; } public string param1 { get; set; } public string param2 { get; set; } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Package.appxmanifest ================================================  Template10 Jerry Assets\StoreLogo.png ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ActionCenterDemo")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ActionCenterDemo")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Repositories/MessageItemRepository.cs ================================================ using ActionCenterDemo.Models; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Storage; namespace ActionCenterDemo.Repositories { class MessageItemRepository { private List _messageItems; private MessageItemRepository() { LoadData(); } public void LoadData() { if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("data")) { ApplicationData.Current.LocalSettings.Values["data"] = Newtonsoft.Json.JsonConvert.SerializeObject(new List()); } var data = ApplicationData.Current.LocalSettings.Values["data"] as string; _messageItems = Newtonsoft.Json.JsonConvert.DeserializeObject>(data); } private static MessageItemRepository _instance; public static MessageItemRepository GetInstance() { if (_instance == null) { _instance = new MessageItemRepository(); } return _instance; } public IEnumerable GetAllMessageItems() { return _messageItems; } public async Task AddAsync(MessageItem messageItem) { _messageItems.Add(messageItem); await PersistAsync(); } public async Task RemoveAsync(string iD) { var target = (from m in _messageItems where m.ID == iD select m).FirstOrDefault(); if (target != null) _messageItems.Remove(target); await PersistAsync(); } public async Task UpdateAsync(MessageItem messageItem) { var target = (from m in _messageItems where m.ID == messageItem.ID select m).FirstOrDefault(); if (target != null) { int idx = _messageItems.IndexOf(target); _messageItems.Remove(target); _messageItems.Insert(idx, messageItem); } await PersistAsync(); } public IEnumerable Find(Func predicate) { return _messageItems.Where(predicate); } private async Task PersistAsync() { ApplicationData.Current.LocalSettings.Values["data"] = Newtonsoft.Json.JsonConvert.SerializeObject(_messageItems); } public void SaveChanges() { ApplicationData.Current.LocalSettings.Values["data"] = Newtonsoft.Json.JsonConvert.SerializeObject(_messageItems); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Services/DispatcherService.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ActionCenterDemo.Services { public static class DispatchService { public static async void InvokeAsync(Action action) { var dispatchObject = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher; if (dispatchObject == null || dispatchObject.HasThreadAccess) { action(); } else { await dispatchObject.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => action.Invoke()); } } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Services/NavigationService.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace ActionCenterDemo.Services { public class NavigationService { NavigationFacade _frame; string LastNavigationParameter { get; set; /* TODO: persist */ } string LastNavigationType { get; set; /* TODO: persist */ } public NavigationService(Frame frame) { _frame = new NavigationFacade(frame); _frame.Navigating += (s, e) => NavigateFrom(false); _frame.Navigated += (s, e) => NavigateTo(e.NavigationMode, e.Parameter); } void NavigateFrom(bool suspending) { var page = _frame.Content as FrameworkElement; if (page != null) { var viewmodel = page.DataContext as Common.ViewModelBase; if (viewmodel != null) { // TODO: get existing state viewmodel.OnNavigatedFrom(null, suspending); } } } void NavigateTo(NavigationMode mode, string parameter) { LastNavigationParameter = parameter; LastNavigationType = _frame.Content.GetType().FullName; if (mode == NavigationMode.New) { // TODO: clear existing state } var page = _frame.Content as FrameworkElement; if (page != null) { var viewmodel = page.DataContext as Common.ViewModelBase; if (viewmodel != null) { // TODO: fetch state viewmodel.OnNavigatedTo(parameter, mode, null); } } } public bool Navigate(Type page, string parameter = null) { if (page == null) throw new ArgumentNullException("page"); if (page.FullName.Equals(LastNavigationType) && parameter == LastNavigationParameter) return false; return _frame.Navigate(page, parameter); } public void RestoreSavedNavigation() { /* TODO */ } public void GoBack() { _frame.GoBack(); } public bool CanGoBack { get { return _frame.CanGoBack; } } public void GoForward() { _frame.GoForward(); } public bool CanGoForward { get { return _frame.CanGoForward; } } public void ClearHistory() { _frame.SetNavigationState("1,0"); } public void Suspending() { NavigateFrom(true); } public void Show(SettingsFlyout flyout, string parameter = null) { if (flyout == null) throw new ArgumentNullException("flyout"); var viewmodel = flyout.DataContext as Common.ViewModelBase; if (viewmodel != null) viewmodel.OnNavigatedTo(parameter, NavigationMode.New, null); flyout.Show(); } public Type CurrentPageType { get { return _frame.CurrentPageType; } } public string CurrentPageParam { get { return _frame.CurrentPageParam; } } } public class NavigationFacade { public NavigationFacade(Frame frame) { _frame = frame; _navigatedEventHandlers = new List>(); } #region frame facade readonly Frame _frame; public bool Navigate(Type page, string parameter) { return _frame.Navigate(page, parameter); } public void SetNavigationState(string state) { _frame.SetNavigationState(state); } public string GetNavigationState() { return _frame.GetNavigationState(); } public int BackStackDepth { get { return _frame.BackStackDepth; } } public bool CanGoBack { get { return _frame.CanGoBack; } } public void GoBack() { _frame.GoBack(); } public bool CanGoForward { get { return _frame.CanGoForward; } } public void GoForward() { _frame.GoForward(); } public object Content { get { return _frame.Content; } } public Type CurrentPageType { get; internal set; } public string CurrentPageParam { get; internal set; } public object GetValue(DependencyProperty dp) { return _frame.GetValue(dp); } public void SetValue(DependencyProperty dp, object value) { _frame.SetValue(dp, value); } public void ClearValue(DependencyProperty dp) { _frame.ClearValue(dp); } #endregion readonly List> _navigatedEventHandlers; public event EventHandler Navigated { add { if (!_navigatedEventHandlers.Contains(value)) { _navigatedEventHandlers.Add(value); if (_navigatedEventHandlers.Count == 1) _frame.Navigated += FacadeNavigatedEventHandler; } } remove { if (_navigatedEventHandlers.Contains(value)) { _navigatedEventHandlers.Remove(value); if (_navigatedEventHandlers.Count == 0) _frame.Navigated -= FacadeNavigatedEventHandler; } } } void FacadeNavigatedEventHandler(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e) { foreach (var handler in _navigatedEventHandlers) { var args = new NavigationEventArgs() { NavigationMode = e.NavigationMode, Parameter = (e.Parameter == null) ? string.Empty : e.Parameter.ToString() }; handler(this, args); } this.CurrentPageType = e.SourcePageType; this.CurrentPageParam = e.Parameter as String; } readonly List _navigatingEventHandlers = new List(); public event EventHandler Navigating { add { if (!_navigatingEventHandlers.Contains(value)) { _navigatingEventHandlers.Add(value); if (_navigatingEventHandlers.Count == 1) _frame.Navigating += FacadeNavigatingCancelEventHandler; } } remove { if (_navigatingEventHandlers.Contains(value)) { _navigatingEventHandlers.Remove(value); if (_navigatingEventHandlers.Count == 0) _frame.Navigating -= FacadeNavigatingCancelEventHandler; } } } private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e) { foreach (var handler in _navigatingEventHandlers) { handler(this, new EventArgs()); } } } public class NavigationEventArgs : EventArgs { public NavigationMode NavigationMode { get; set; } public string Parameter { get; set; } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Services/TileServices.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Data.Xml.Dom; using Windows.UI.Notifications; namespace ActionCenterDemo.Services { public class TileServices { static public void SetBadgeCountOnTile(int count) { // Update the badge on the real tile XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber); XmlElement badgeElement = (XmlElement)badgeXml.SelectSingleNode("/badge"); badgeElement.SetAttribute("value", count.ToString()); BadgeNotification badge = new BadgeNotification(badgeXml); BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge); } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/ViewModels/DetailPageViewModel.cs ================================================ using System; using ActionCenterDemo.Common; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI; using Windows.UI.Xaml.Navigation; using Windows.UI.Xaml.Media; using System.Diagnostics; using Windows.UI.Notifications; using ActionCenterDemo.Services; namespace ActionCenterDemo.ViewModels { public class DetailPageViewModel : Common.ViewModelBase { private Repositories.MessageItemRepository _repository; public DetailPageViewModel() { if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) LoadDesignData(); } public override async void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state) { Debug.WriteLine("In DetailPageViewModel OnNavigatedTo"); _repository = Repositories.MessageItemRepository.GetInstance(); await LoadRuntimeDataAsync(parameter); // Since we are viewing this item, set its status to 'Read' this.MessageItem.IsRead = true; await _repository.UpdateAsync(this.MessageItem); #region Remove corresponding item from Action Center // Also remove it from the Action Center if it is there //ToastNotificationManager.History.Remove(parameter); #endregion #region Sync Tile badge count with unread toasts count from Action Center //// Set the Badge count on the tile //var toasts = ToastNotificationManager.History.GetHistory(); //if (toasts != null) //{ // var count = toasts.Count(); // // Sync up the count on the tile // TileServices.SetBadgeCountOnTile(count); //} #endregion } private void LoadDesignData() { this.MessageItem = new Models.MessageItem { ID = "1", Body = "Design Data Body", Title = "Design Title", IsRead = false }; } private async Task LoadRuntimeDataAsync(string parameter) { _repository.GetAllMessageItems(); this.MessageItem = _repository.Find(m => m.ID == parameter).FirstOrDefault(); } private Models.MessageItem _messageItem; public Models.MessageItem MessageItem { get { return _messageItem; } set { Set(ref _messageItem, value); } } public Common.Command GoBackCommand { get { return new Common.Command(() => { (App.Current as Common.ApplicationBase).NavigationService.GoBack(); }); } } } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/ViewModels/MainPageViewModel.cs ================================================ using ActionCenterDemo.Models; using ActionCenterDemo.Services; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Windows.ApplicationModel.Background; using Windows.ApplicationModel.Core; using Windows.Data.Xml.Dom; using Windows.UI.Core; using Windows.UI.Notifications; using Windows.UI.Xaml.Navigation; namespace ActionCenterDemo.ViewModels { class MainPageViewModel : Common.ViewModelBase { public MainPageViewModel() { if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) { LoadDesigntimeData(); } else { this.PropertyChanged += (s, e) => { this.RefreshCommand.RaiseCanExecuteChanged(); }; } } public override async void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state) { Debug.WriteLine("In MainPageViewModel OnNavigatedTo"); await LoadRuntimeDataAsync(); IsTaskRegistered(); } private void LoadDesigntimeData() { this.MessageItems.Clear(); this.MessageItems.Add(new Models.MessageItem { ID = "1", Body = "Design Data Body", Title = "Design Title", IsRead = false }); this.MessageItems.Add(new Models.MessageItem { ID = "2", Body = "Design Data Body 2", Title = "Design Title 2", IsRead = true }); this.MessageItems.Add(new Models.MessageItem { ID = "3", Body = "Design Data Body 3", Title = "Design Title 3", IsRead = false }); this.MessageItems.Add(new Models.MessageItem { ID = "4", Body = "Design Data Body 4", Title = "Design Title 4", IsRead = true }); this.Selected = (this.MessageItems.Any()) ? MessageItems.First() : default(Models.MessageItem); } private Repositories.MessageItemRepository _repository; private async Task LoadRuntimeDataAsync() { _repository = Repositories.MessageItemRepository.GetInstance(); _repository.LoadData(); this.MessageItems.Clear(); foreach (var messageItem in _repository.GetAllMessageItems()) { this.MessageItems.Add(messageItem); } // Set the count on the simulated tile int unreadCount = (from m in this.MessageItems where !m.IsRead select m).Count(); this.TileSimulationBadgeCount = unreadCount; } private Models.MessageItem _selected; public Models.MessageItem Selected { get { return _selected; } set { Set(ref _selected, value); if (value != null) { this.Selected = null; // navigate to details page if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled) { var nav = (App.Current as App).NavigationService; nav.Navigate(typeof(Views.DetailPage), value.ID); } } } } public ObservableCollection MessageItems { get; } = new ObservableCollection(); private bool _busy; public bool Busy { get { return _busy; } set { Set(ref _busy, value); } } private int _tileSimulationBadgeCount; public int TileSimulationBadgeCount { get { return _tileSimulationBadgeCount; } set { Set(ref _tileSimulationBadgeCount, value); } } private Common.Command _refreshCommand; public Common.Command RefreshCommand { get { return _refreshCommand ?? (_refreshCommand = new Common.Command(async () => { this.Busy = true; await LoadRuntimeDataAsync(); this.Busy = false; }, () => { return !this.Busy; })); } } private Common.Command _deliverToastCommand; public Common.Command DeliverToastCommand { get { return _deliverToastCommand ?? (_deliverToastCommand = new Common.Command(async () => { this.Busy = true; // Generate a new message data item - this // Simulates a toast coming in from your cloud backend var msgItem = new MessageItem() { ID = Guid.NewGuid().ToString().Split('-')[0].ToString(), Title = "Hello Msg #" + System.Environment.TickCount, Body = "This is a new message created at " + System.DateTime.Now.ToString("t"), IsRead = false }; // Send a toast notification to alert the user of the new item DeliverToast(msgItem); // Update the Main Tile SetBadgeCountOnTileandSim(); // Save the new messageItem to our local storage await _repository.AddAsync(msgItem); // Update our list of MessageItems shown on our UI await LoadRuntimeDataAsync(); this.Busy = false; }, () => { return !this.Busy; })); } } private void DeliverToast(MessageItem msgItem) { // Send the Toast Notification informing the user of a new message ToastTemplateType toastTemplate = ToastTemplateType.ToastImageAndText01; XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate); XmlNodeList toastTextElements = toastXml.GetElementsByTagName("text"); toastTextElements[0].AppendChild(toastXml.CreateTextNode(msgItem.Title)); IXmlNode toastNode = toastXml.SelectSingleNode("/toast"); ((XmlElement)toastNode).SetAttribute("launch", "{\"type\":\"toast\",\"param1\":\"" + msgItem.ID + "\",\"param2\":\"0\"}"); ToastNotification toast = new ToastNotification(toastXml); // Tag the Toast with the data item ID // Note that Toasts sent from servers set the Tag through an HTTP Header toast.Tag = msgItem.ID; ToastNotificationManager.CreateToastNotifier().Show(toast); } private Common.Command _resetAllCountsCommand; /// /// Gets the ToastNotificationManager History and ensures the badge count /// on the Tile simulation on the UI and on the actual Tile matches /// the true count of unread notifications in Action Center /// public Common.Command ResetAllCountsCommand { get { return _resetAllCountsCommand ?? (_resetAllCountsCommand = new Common.Command(async () => { this.Busy = true; // Set count on Tile and on our Simulation SetBadgeCountOnTileandSim(); // Set 'Read' status of local data items to match unactioned Notifications foreach (var item in MessageItems) { item.IsRead = true; } var toasts = ToastNotificationManager.History.GetHistory(); if (toasts != null) { foreach (var item in toasts) { var launchAttr = item.Content.SelectSingleNode("/toast/@launch").NodeValue.ToString(); dynamic d = Newtonsoft.Json.Linq.JObject.Parse(launchAttr); var msgID = (string)d.param1; var dataItem = MessageItems.Where(p => p.ID == msgID).SingleOrDefault(); if (dataItem != null) { dataItem.IsRead = false; } } } await LoadRuntimeDataAsync(); this.Busy = false; }, () => { return !this.Busy; })); } } private void SetBadgeCountOnTileandSim() { // Get the toast history from Notification Center var toasts = ToastNotificationManager.History.GetHistory(); if (toasts != null) { var count = toasts.Count(); // Sync up the count on the tile TileServices.SetBadgeCountOnTile(count); //...and on our simulation on the UI this.TileSimulationBadgeCount = count; } } #region REGISTER_BG_TASK private Common.Command _registerBGTaskCommand; public Common.Command RegisterBGTaskCommand { get { return _registerBGTaskCommand ?? (_registerBGTaskCommand = new Common.Command(async () => { this.Busy = true; await Register(); this.Busy = false; }, () => { return !this.Busy; })); } } private readonly string ActionCenterHistoryChangedTaskName = "ActionCenterHistoryChangedTask"; public async Task Register() { if (!IsTaskRegistered()) { var builder = new BackgroundTaskBuilder(); builder.Name = ActionCenterHistoryChangedTaskName; builder.TaskEntryPoint = "ActionCenterHistoryChangedTask.ActionCenterChangedBackgroundTask"; builder.SetTrigger(new ToastNotificationHistoryChangedTrigger()); BackgroundExecutionManager.RemoveAccess(); BackgroundAccessStatus x = await BackgroundExecutionManager.RequestAccessAsync(); BackgroundTaskRegistration mytask = builder.Register(); mytask.Completed += Mytask_Completed; } } private async void Mytask_Completed(BackgroundTaskRegistration sender, BackgroundTaskCompletedEventArgs args) { // Background task has completed - refresh our data await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync( CoreDispatcherPriority.Normal, async () => await LoadRuntimeDataAsync() ); } public bool IsTaskRegistered() { var taskRegistered = false; var entry = BackgroundTaskRegistration.AllTasks.FirstOrDefault( kvp => kvp.Value.Name == ActionCenterHistoryChangedTaskName); if (entry.Value != null) { taskRegistered = true; // Hook up the completed event handler again entry.Value.Completed += Mytask_Completed; } return taskRegistered; } #endregion } } ================================================ FILE: ActionCenterDemo/ActionCenterDemo/Views/DetailPage.xaml ================================================  ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/ApiInformationPage.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace AdaptiveUI.Views { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class ApiInformationPage : Page { public ApiInformationPage() { this.InitializeComponent(); } } } ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/MainPage.xaml ================================================  ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/MainPage.xaml.cs ================================================ using AdaptiveUI.Model; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; using Windows.UI.Xaml.Shapes; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 namespace AdaptiveUI.Views { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); } private void SampleGrid_ItemClick(object sender, ItemClickEventArgs e) { //var //await Windows.Graphics.Printing.PrintManager.ShowPrintUIAsync(); // Which sample? var sample = (SampleInfo)e.ClickedItem; // Go! Frame.Navigate(sample.Type); } } } ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/OrientationPage.xaml ================================================  32 ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/OrientationPage.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace AdaptiveUI.Views { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class OrientationPage : Page { public OrientationPage() { this.InitializeComponent(); } } } ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/WindowSizePage.xaml ================================================  ================================================ FILE: AdaptiveUI/AdaptiveUI/Views/WindowSizePage.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace AdaptiveUI.Views { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class WindowSizePage : Page { public WindowSizePage() { this.InitializeComponent(); } } } ================================================ FILE: AdaptiveUI/AdaptiveUI/packages.config ================================================  ================================================ FILE: AdaptiveUI/AdaptiveUI.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdaptiveUI-Blank", "AdaptiveUI\AdaptiveUI-Blank.csproj", "{B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|ARM.ActiveCfg = Debug|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|ARM.Build.0 = Debug|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|ARM.Deploy.0 = Debug|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x64.ActiveCfg = Debug|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x64.Build.0 = Debug|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x64.Deploy.0 = Debug|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x86.ActiveCfg = Debug|x86 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x86.Build.0 = Debug|x86 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Debug|x86.Deploy.0 = Debug|x86 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|ARM.ActiveCfg = Release|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|ARM.Build.0 = Release|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|ARM.Deploy.0 = Release|ARM {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x64.ActiveCfg = Release|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x64.Build.0 = Release|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x64.Deploy.0 = Release|x64 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x86.ActiveCfg = Release|x86 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x86.Build.0 = Release|x86 {B50A5A2D-3AAE-4AB2-9ED0-B64189A7AFE7}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: AppService/AppService_EncoderDecoder/AppService_EncoderDecoder.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientApp", "ClientApp\ClientApp.csproj", "{A10B7BB2-E660-463C-BD80-952AE6306FEF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerApp", "ServerApp\ServerApp.csproj", "{D87D4A6A-9FA2-4003-A43E-2B88E97C838D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEncoderComponent", "TextEncoderComponent\TextEncoderComponent.csproj", "{F8FDB39A-D4F9-4E71-8541-83AE4D98E227}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|Any CPU.ActiveCfg = Debug|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|ARM.ActiveCfg = Debug|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|ARM.Build.0 = Debug|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|ARM.Deploy.0 = Debug|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x64.ActiveCfg = Debug|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x64.Build.0 = Debug|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x64.Deploy.0 = Debug|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x86.ActiveCfg = Debug|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x86.Build.0 = Debug|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Debug|x86.Deploy.0 = Debug|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|Any CPU.ActiveCfg = Release|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|ARM.ActiveCfg = Release|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|ARM.Build.0 = Release|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|ARM.Deploy.0 = Release|ARM {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x64.ActiveCfg = Release|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x64.Build.0 = Release|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x64.Deploy.0 = Release|x64 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x86.ActiveCfg = Release|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x86.Build.0 = Release|x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF}.Release|x86.Deploy.0 = Release|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|Any CPU.ActiveCfg = Debug|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|ARM.ActiveCfg = Debug|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|ARM.Build.0 = Debug|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|ARM.Deploy.0 = Debug|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x64.ActiveCfg = Debug|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x64.Build.0 = Debug|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x64.Deploy.0 = Debug|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x86.ActiveCfg = Debug|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x86.Build.0 = Debug|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Debug|x86.Deploy.0 = Debug|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|Any CPU.ActiveCfg = Release|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|ARM.ActiveCfg = Release|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|ARM.Build.0 = Release|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|ARM.Deploy.0 = Release|ARM {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x64.ActiveCfg = Release|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x64.Build.0 = Release|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x64.Deploy.0 = Release|x64 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x86.ActiveCfg = Release|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x86.Build.0 = Release|x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D}.Release|x86.Deploy.0 = Release|x86 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|ARM.ActiveCfg = Debug|ARM {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|ARM.Build.0 = Debug|ARM {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|x64.ActiveCfg = Debug|x64 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|x64.Build.0 = Debug|x64 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|x86.ActiveCfg = Debug|x86 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Debug|x86.Build.0 = Debug|x86 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|Any CPU.Build.0 = Release|Any CPU {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|ARM.ActiveCfg = Release|ARM {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|ARM.Build.0 = Release|ARM {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|x64.ActiveCfg = Release|x64 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|x64.Build.0 = Release|x64 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|x86.ActiveCfg = Release|x86 {F8FDB39A-D4F9-4E71-8541-83AE4D98E227}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/App.xaml ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/App.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409 namespace ClientApp { /// /// Provides application-specific behavior to supplement the default Application class. /// sealed partial class App : Application { /// /// Allows tracking page views, exceptions and other telemetry through the Microsoft Application Insights service. /// public static Microsoft.ApplicationInsights.TelemetryClient TelemetryClient; /// /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// public App() { TelemetryClient = new Microsoft.ApplicationInsights.TelemetryClient(); this.InitializeComponent(); this.Suspending += OnSuspending; } /// /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// /// Details about the launch request and process. protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } /// /// Invoked when Navigation to a certain page fails /// /// The Frame which failed navigation /// Details about the navigation failure void OnNavigationFailed(object sender, NavigationFailedEventArgs e) { throw new Exception("Failed to load Page " + e.SourcePageType.FullName); } /// /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// /// The source of the suspend request. /// Details about the suspend request. private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity deferral.Complete(); } } } ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/ApplicationInsights.config ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/ClientApp.csproj ================================================  Debug x86 {A10B7BB2-E660-463C-BD80-952AE6306FEF} AppContainerExe Properties ClientApp ClientApp en-US UAP 10.0.10069.0 10.0.10069.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ClientApp_TemporaryKey.pfx true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true true App.xaml MainPage.xaml Designer MSBuild:Compile Designer MSBuild:Compile Designer ..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll True ..\packages\Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll True ..\packages\Microsoft.ApplicationInsights.PersistenceChannel.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll True 14.0 This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/MainPage.xaml ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/MainPage.xaml.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using System.Threading.Tasks; using Windows.ApplicationModel.AppService; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Popups; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 namespace ClientApp { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class MainPage : Page { private AppServiceConnection serviceConnection; public MainPage() { this.InitializeComponent(); } private async void ButtonEncode_Click(object sender, RoutedEventArgs e) { textBoxOutput.Text= await CallServiceAsync("Encode"); } private async void ButtonDecode_Click(object sender, RoutedEventArgs e) { textBoxOutput.Text = await CallServiceAsync("Decode"); } private async Task CallServiceAsync(string command) { if (serviceConnection == null) { // create a new service connection serviceConnection = new AppServiceConnection(); // provide app service name specified in appxmanifest serviceConnection.AppServiceName = "EndcoderDecoderService"; // package family name of the ServerApp serviceConnection.PackageFamilyName = "02977d55-465f-411a-8c54-3b82442099a2_e7qah2kqbxs60"; // open connection var status = await serviceConnection.OpenAsync(); // handle the cases where the appservice connection fails if (status != AppServiceConnectionStatus.Success) { Debug.WriteLine("Failed to open connection: " + status.ToString()); return "Error"; } } // create a bag of values var message = new ValueSet(); message.Add("cmd", command); message.Add("txt", textBox.Text); // send the message AppServiceResponse response = await serviceConnection.SendMessageAsync(message); if (response.Status == AppServiceResponseStatus.Success) { var result = response.Message["result"] as string; await new MessageDialog(result).ShowAsync(); return result; } else { Debug.WriteLine("Message send failed!"); return "Error"; } } } } ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/Package.appxmanifest ================================================  ClientApp danmeix Assets\StoreLogo.png ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ClientApp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ClientApp")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/Properties/Default.rd.xml ================================================ ================================================ FILE: AppService/AppService_EncoderDecoder/ClientApp/packages.config ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/App.xaml ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/App.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409 namespace ServerApp { /// /// Provides application-specific behavior to supplement the default Application class. /// sealed partial class App : Application { /// /// Allows tracking page views, exceptions and other telemetry through the Microsoft Application Insights service. /// public static Microsoft.ApplicationInsights.TelemetryClient TelemetryClient; /// /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// public App() { TelemetryClient = new Microsoft.ApplicationInsights.TelemetryClient(); this.InitializeComponent(); this.Suspending += OnSuspending; } /// /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// /// Details about the launch request and process. protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } /// /// Invoked when Navigation to a certain page fails /// /// The Frame which failed navigation /// Details about the navigation failure void OnNavigationFailed(object sender, NavigationFailedEventArgs e) { throw new Exception("Failed to load Page " + e.SourcePageType.FullName); } /// /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// /// The source of the suspend request. /// Details about the suspend request. private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity deferral.Complete(); } } } ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/ApplicationInsights.config ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/MainPage.xaml ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/MainPage.xaml.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Popups; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 namespace ServerApp { /// /// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); ShowPFN(); } // get the package family name private async void ShowPFN() { var PFN = Windows.ApplicationModel.Package.Current.Id.FamilyName; Debug.WriteLine("PFN=" + PFN); await new MessageDialog(PFN).ShowAsync(); } } } ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/Package.appxmanifest ================================================  ServerApp danmeix Assets\StoreLogo.png ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ServerApp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ServerApp")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/Properties/Default.rd.xml ================================================ ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/ServerApp.csproj ================================================  Debug x86 {D87D4A6A-9FA2-4003-A43E-2B88E97C838D} AppContainerExe Properties ServerApp ServerApp en-US UAP 10.0.10069.0 10.0.10069.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ServerApp_TemporaryKey.pfx true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true true App.xaml MainPage.xaml Designer MSBuild:Compile Designer MSBuild:Compile Designer ..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll True ..\packages\Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll True ..\packages\Microsoft.ApplicationInsights.PersistenceChannel.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll True {f8fdb39a-d4f9-4e71-8541-83ae4d98e227} TextEncoderComponent 14.0 This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. ================================================ FILE: AppService/AppService_EncoderDecoder/ServerApp/packages.config ================================================  ================================================ FILE: AppService/AppService_EncoderDecoder/TextEncoderComponent/EncoderDecoderTask.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.ApplicationModel.AppService; using Windows.ApplicationModel.Background; using Windows.Foundation.Collections; using Windows.Security.Cryptography; namespace TextEncoderComponent { public sealed class EncoderDecoderTask : IBackgroundTask { private BackgroundTaskDeferral serviceDeferral; public void Run(IBackgroundTaskInstance taskInstance) { //Take a service deferral so the service isn't terminated serviceDeferral = taskInstance.GetDeferral(); // Associate a cancellation handler with the background task. taskInstance.Canceled += TaskInstance_Canceled; var triggerDetails = taskInstance.TriggerDetails as AppServiceTriggerDetails; if (triggerDetails != null) { //Listen for incoming app service requests triggerDetails.AppServiceConnection.RequestReceived += OnRequestReceived; } } private void TaskInstance_Canceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason) { throw new NotImplementedException(); } private async void OnRequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args) { var message = args.Request.Message; string cmd = message["cmd"] as string; string txt = message["txt"] as string; switch (cmd) { case "Encode": { var messageDeferral = args.GetDeferral(); string result = Encode(txt); var returnMessage = new ValueSet(); returnMessage.Add("result", result); var responseStatus = await args.Request.SendResponseAsync(returnMessage); messageDeferral.Complete(); break; } case "Decode": { var messageDeferral = args.GetDeferral(); string result = Decode(txt); var returnMessage = new ValueSet(); returnMessage.Add("result", result); var responseStatus = await args.Request.SendResponseAsync(returnMessage); messageDeferral.Complete(); break; } case "Quit": { serviceDeferral.Complete(); break; } } } public string Encode(string txt) { var buffer = CryptographicBuffer.ConvertStringToBinary(txt, BinaryStringEncoding.Utf8); return CryptographicBuffer.EncodeToBase64String(buffer); } public string Decode(string encodedString) { var buffer = CryptographicBuffer.DecodeFromBase64String(encodedString); return CryptographicBuffer.ConvertBinaryToString(BinaryStringEncoding.Utf8, buffer); } } } ================================================ FILE: AppService/AppService_EncoderDecoder/TextEncoderComponent/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("TextEncoderComponent")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TextEncoderComponent")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: AppService/AppService_EncoderDecoder/TextEncoderComponent/TextEncoderComponent.csproj ================================================  Debug AnyCPU {F8FDB39A-D4F9-4E71-8541-83AE4D98E227} winmdobj Properties TextEncoderComponent TextEncoderComponent en-US UAP 10.0.10069.0 10.0.10069.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} false AnyCPU true full false bin\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 AnyCPU pdbonly true bin\Release\ TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 ARM true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true ARM bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true x64 true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true x64 bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true x86 true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true x86 bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll True 14.0 ================================================ FILE: AppService/AppService_EncoderDecoder/TextEncoderComponent/packages.config ================================================  ================================================ FILE: AppServicesDemo/SimpleCalculatorAppService/AppServicesClientApp/App.xaml ================================================  ================================================ FILE: AppServicesDemo/SimpleCalculatorAppService/AppServicesClientApp/App.xaml.cs ================================================ using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409 namespace AppServicesClientApp { /// /// Provides application-specific behavior to supplement the default Application class. /// sealed partial class App : Application { /// /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// public App() { this.InitializeComponent(); this.Suspending += OnSuspending; } /// /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// /// Details about the launch request and process. protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); // Set the default language rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } /// /// Invoked when Navigation to a certain page fails /// /// The Frame which failed navigation /// Details about the navigation failure void OnNavigationFailed(object sender, NavigationFailedEventArgs e) { throw new Exception("Failed to load Page " + e.SourcePageType.FullName); } /// /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// /// The source of the suspend request. /// Details about the suspend request. private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Save application state and stop any background activity deferral.Complete(); } } } ================================================ FILE: AppServicesDemo/SimpleCalculatorAppService/AppServicesClientApp/AppServicesClientApp.csproj ================================================  Debug AnyCPU {FC5BB245-AF79-44A0-970D-2CD910C13DE8} AppContainerExe Properties AppServicesClientApp AppServicesClientApp en-US UAP 10.0.10069.0 10.0.10069.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} AppServicesClientApp_TemporaryKey.pfx AnyCPU true full false bin\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 AnyCPU pdbonly true bin\Release\ TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true true App.xaml MainPage.xaml Designer MSBuild:Compile Designer MSBuild:Compile Designer 14.0 ================================================ FILE: AppServicesDemo/SimpleCalculatorAppService/AppServicesClientApp/MainPage.xaml ================================================  ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/MainPage.xaml.cs ================================================ using Windows.UI.Xaml.Controls; namespace UWPDevMVA { public sealed partial class MainPage : Page { } } ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/Package.appxmanifest ================================================ UWPDevMVA.UWP Mobile Services Assets\StoreLogo.png ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("UWPDevMVA.WindowsPhone")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UWPDevMVA.WindowsPhone")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/UWPDevMVA.UWP.csproj ================================================  Debug AnyCPU {BD50ECA0-7F46-41E1-A407-56821F327B5B} AppContainerExe Properties UWPDevMVA UWPDevMVA.WindowsPhone en-US UAP 10.0.10069.0 10.0.10069.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} true ..\ true AnyCPU true full false bin\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 AnyCPU pdbonly true bin\Release\ TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true App.xaml MainPage.xaml Designer MSBuild:Compile Designer MSBuild:Compile Designer ..\..\packages\WindowsAzure.MobileServices.2.0.0-beta\lib\wpa81\Microsoft.WindowsAzure.Mobile.dll ..\..\packages\WindowsAzure.MobileServices.2.0.0-beta\lib\wpa81\Microsoft.WindowsAzure.Mobile.Ext.dll ..\..\packages\WindowsAzure.MobileServices.SQLiteStore.2.0.0-beta\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll True ..\..\packages\Newtonsoft.Json.6.0.8\lib\netcore45\Newtonsoft.Json.dll True ..\..\packages\SQLitePCL.3.8.7.2\lib\netcore451\SQLitePCL.dll True ..\..\packages\Microsoft.Net.Http.2.2.29\lib\win8\System.Net.Http.Extensions.dll True ..\..\packages\Microsoft.Net.Http.2.2.29\lib\win8\System.Net.Http.Primitives.dll True Microsoft Visual C++ AppLocal Runtime Package for Windows UAP SQLite for Universal App Platform 14.0 This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/app.config ================================================  ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA/UWPDevMVA.WindowsPhone/packages.config ================================================  ================================================ FILE: AzureMobileApps/UWPDevMVA_Windows_CS/UWPDevMVA.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UWPDevMVA", "UWPDevMVA", "{F6C0526E-9FE6-4B07-B340-243315E431F1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWPDevMVA.UWP", "UWPDevMVA\UWPDevMVA.WindowsPhone\UWPDevMVA.UWP.csproj", "{BD50ECA0-7F46-41E1-A407-56821F327B5B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|Any CPU.Build.0 = Debug|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|ARM.ActiveCfg = Debug|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|ARM.Build.0 = Debug|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|ARM.Deploy.0 = Debug|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|x64.ActiveCfg = Debug|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|x86.ActiveCfg = Debug|x86 {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|x86.Build.0 = Debug|x86 {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Debug|x86.Deploy.0 = Debug|x86 {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|Any CPU.Build.0 = Release|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|Any CPU.Deploy.0 = Release|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|ARM.ActiveCfg = Release|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|ARM.Build.0 = Release|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|ARM.Deploy.0 = Release|ARM {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|x64.ActiveCfg = Release|Any CPU {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|x86.ActiveCfg = Release|x86 {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|x86.Build.0 = Release|x86 {BD50ECA0-7F46-41E1-A407-56821F327B5B}.Release|x86.Deploy.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {BD50ECA0-7F46-41E1-A407-56821F327B5B} = {F6C0526E-9FE6-4B07-B340-243315E431F1} EndGlobalSection EndGlobal ================================================ FILE: BackgroundExecution/BackgroundExecution.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForegroundApp", "ForegroundApp\ForegroundApp.csproj", "{78846B8C-1024-40A0-B57E-74105AC39342}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackgroundTask", "BackgroundTask\BackgroundTask.csproj", "{B410A17C-6A4C-4089-A05B-DFC784FD04AD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|Any CPU.ActiveCfg = Debug|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|ARM.ActiveCfg = Debug|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|ARM.Build.0 = Debug|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|ARM.Deploy.0 = Debug|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x64.ActiveCfg = Debug|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x64.Build.0 = Debug|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x64.Deploy.0 = Debug|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x86.ActiveCfg = Debug|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x86.Build.0 = Debug|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Debug|x86.Deploy.0 = Debug|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|Any CPU.ActiveCfg = Release|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|ARM.ActiveCfg = Release|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Release|ARM.Build.0 = Release|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Release|ARM.Deploy.0 = Release|ARM {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x64.ActiveCfg = Release|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x64.Build.0 = Release|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x64.Deploy.0 = Release|x64 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x86.ActiveCfg = Release|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x86.Build.0 = Release|x86 {78846B8C-1024-40A0-B57E-74105AC39342}.Release|x86.Deploy.0 = Release|x86 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|Any CPU.Build.0 = Debug|Any CPU {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|ARM.ActiveCfg = Debug|ARM {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|ARM.Build.0 = Debug|ARM {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|x64.ActiveCfg = Debug|x64 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|x64.Build.0 = Debug|x64 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|x86.ActiveCfg = Debug|x86 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Debug|x86.Build.0 = Debug|x86 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|Any CPU.ActiveCfg = Release|Any CPU {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|Any CPU.Build.0 = Release|Any CPU {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|ARM.ActiveCfg = Release|ARM {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|ARM.Build.0 = Release|ARM {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|x64.ActiveCfg = Release|x64 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|x64.Build.0 = Release|x64 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|x86.ActiveCfg = Release|x86 {B410A17C-6A4C-4089-A05B-DFC784FD04AD}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: BackgroundExecution/BackgroundTask/BackgroundTask.csproj ================================================  Debug AnyCPU {B410A17C-6A4C-4089-A05B-DFC784FD04AD} winmdobj Properties Template10 Template10Background en-US UAP 10.0.10069.0 10.0.10069.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} false AnyCPU true full false bin\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 AnyCPU pdbonly true bin\Release\ TRACE;NETFX_CORE;WINDOWS_UAP prompt 4 ARM true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true ARM bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true x64 true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true x64 bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true x86 true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true x86 bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll True 14.0 ================================================ FILE: BackgroundExecution/BackgroundTask/MyUpdateBadgeTask.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.ApplicationModel.Background; using Windows.Data.Xml.Dom; using Windows.UI.Notifications; namespace Template10 { public sealed class MyUpdateBadgeTask : IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { var cost = BackgroundWorkCost.CurrentBackgroundWorkCost; if (cost == BackgroundWorkCostValue.High) { Debug.WriteLine("Background task aborted (cost is high)"); } else { // handle canceled taskInstance.Canceled += (s, e) => { Debug.WriteLine("Background task canceled"); }; // perform task var deferral = taskInstance.GetDeferral(); try { var seed = (int)DateTime.Now.Ticks; var random = new Random(seed); var value = random.Next(1, 50); UpdateTile(value); Debug.WriteLine("Background task complete: " + value.ToString()); } catch (Exception ex) { Debug.WriteLine("Background task error: " + ex.Message); } finally { deferral.Complete(); } } } public static void UpdateTile(int value) { var type = BadgeTemplateType.BadgeNumber; var xml = BadgeUpdateManager.GetTemplateContent(type); var elements = xml.GetElementsByTagName("badge"); var element = elements[0] as XmlElement; element.SetAttribute("value", value.ToString()); var updater = BadgeUpdateManager.CreateBadgeUpdaterForApplication(); var notification = new BadgeNotification(xml); updater.Update(notification); Debug.WriteLine("Background task badge updated: " + value.ToString()); var template = ToastTemplateType.ToastText01; xml = ToastNotificationManager.GetTemplateContent(template); var text = xml.CreateTextNode(string.Format("Badge updated to {0}", value)); elements = xml.GetElementsByTagName("text"); elements[0].AppendChild(text); var toast = new ToastNotification(xml); var notifier = ToastNotificationManager.CreateToastNotifier(); notifier.Show(toast); Debug.WriteLine("Background task toast shown: " + value.ToString()); } } } ================================================ FILE: BackgroundExecution/BackgroundTask/MyUpdateTileTask.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using System.Text; using System.Threading.Tasks; using Windows.ApplicationModel.Background; using Windows.Data.Xml.Dom; using Windows.Graphics.Display; using Windows.Graphics.Imaging; using Windows.Storage; using Windows.UI; using Windows.UI.Notifications; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Markup; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; namespace Template10 { public sealed class MyUpdateTileTask : XamlRenderingBackgroundTask { protected override async void OnRun(IBackgroundTaskInstance taskInstance) { var cost = BackgroundWorkCost.CurrentBackgroundWorkCost; if (cost == BackgroundWorkCostValue.High) { Debug.WriteLine("Background task aborted (cost is high)"); } else { // handle canceled taskInstance.Canceled += (s, e) => { Debug.WriteLine("Background task canceled"); }; // perform task var deferral = taskInstance.GetDeferral(); try { await UpdateTileAsync(); Debug.WriteLine("Background task complete"); } catch (Exception ex) { Debug.WriteLine("Background task error: " + ex.Message); } finally { deferral.Complete(); } } } private async Task UpdateTileAsync() { // create UI var grid = new Grid { VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Stretch, HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch, }; var star = new FontIcon { Glyph = "", FontSize = 50 }; grid.Children.Add(star); var number = new TextBlock { Text = 12.ToString(), FontSize = 25, Foreground = new SolidColorBrush(Colors.White) }; grid.Children.Add(number); // create bitmap var bitmap = new RenderTargetBitmap(); await bitmap.RenderAsync(grid, 150, 150); // create destination file var folder = ApplicationData.Current.LocalFolder; var file = await folder.CreateFileAsync("tile.png", CreationCollisionOption.ReplaceExisting); // write bitmap to file using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite)) { var pixels = await bitmap.GetPixelsAsync(); // using System.Runtime.InteropServices.WindowsRuntime; var bytes = pixels.ToArray(); var encoder = await BitmapEncoder .CreateAsync(BitmapEncoder.PngEncoderId, stream); var format = BitmapPixelFormat.Bgra8; var alpha = BitmapAlphaMode.Ignore; var width = (uint)bitmap.PixelWidth; var height = (uint)bitmap.PixelHeight; var dpi = DisplayInformation.GetForCurrentView().LogicalDpi; encoder.SetPixelData(format, alpha, width, height, dpi, dpi, bytes); await encoder.FlushAsync(); stream.Seek(0); } await FileIO.WriteBytesAsync(file, null); // replace existing tile var type = TileTemplateType.TileSquare150x150Image; var xml = TileUpdateManager.GetTemplateContent(type); // no text on tile var elements = xml.GetElementsByTagName("binding"); (elements[0] as XmlElement).SetAttribute("branding", "none"); // image on tile elements = xml.GetElementsByTagName("image"); (elements[0] as XmlElement).SetAttribute("src", file.Path); // update tile var notification = new TileNotification(xml); var updater = TileUpdateManager.CreateTileUpdaterForApplication(); updater.Clear(); updater.Update(notification); // prepare notification toast var toastTemplate = ToastTemplateType.ToastText01; xml = ToastNotificationManager.GetTemplateContent(toastTemplate); var text = xml.CreateTextNode(string.Format("Tile image updated to {0}", number)); elements = xml.GetElementsByTagName("text"); elements[0].AppendChild(text); // send toast var toast = new ToastNotification(xml); var notifier = ToastNotificationManager.CreateToastNotifier(); notifier.Show(toast); Debug.WriteLine("Background task toast shown: " + number.ToString()); } } } ================================================ FILE: BackgroundExecution/BackgroundTask/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("BackgroundTask")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("BackgroundTask")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: BackgroundExecution/BackgroundTask/packages.config ================================================  ================================================ FILE: BackgroundExecution/ForegroundApp/App.xaml ================================================  0 Visible Collapsed true Visible Collapsed ================================================ FILE: BackgroundExecution/ForegroundApp/App.xaml.cs ================================================ using System; using System.Threading.Tasks; using Windows.ApplicationModel.Activation; namespace Template10 { sealed partial class App : Common.BootStrapper { public App() : base() { this.InitializeComponent(); } public override Task OnLaunchedAsync(ILaunchActivatedEventArgs e) { this.NavigationService.Navigate(typeof(Views.MainPage)); return Task.FromResult(null); } } } ================================================ FILE: BackgroundExecution/ForegroundApp/ApplicationInsights.config ================================================  ================================================ FILE: BackgroundExecution/ForegroundApp/Common/BackgroundHelper.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.ApplicationModel.Background; namespace Template10 { public static class BackgroundHelper { public static IBackgroundTaskRegistration FindRegistration() where T : class { return BackgroundTaskRegistration.AllTasks .Where(x => x.Value.Name.Equals(nameof(T))) .Select(x => x.Value) .FirstOrDefault(); } public async static Task Register(IBackgroundTrigger trigger, IEnumerable conditions = null) where T : class { await BackgroundExecutionManager.RequestAccessAsync(); var allowed = BackgroundExecutionManager.GetAccessStatus(); switch (allowed) { case BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity: case BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity: break; case BackgroundAccessStatus.Unspecified: case BackgroundAccessStatus.Denied: return null; } var existing = FindRegistration(); if (existing != null) existing.Unregister(false); var task = new BackgroundTaskBuilder { Name = nameof(MyUpdateBadgeTask), CancelOnConditionLoss = false, TaskEntryPoint = typeof(T).ToString(), }; task.SetTrigger(trigger); if (conditions != null) { foreach (var condition in conditions) task.AddCondition(condition); } return task.Register(); } public async static Task Unregister() where T : class { await BackgroundExecutionManager.RequestAccessAsync(); var allowed = BackgroundExecutionManager.GetAccessStatus(); switch (allowed) { case BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity: case BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity: break; case BackgroundAccessStatus.Unspecified: case BackgroundAccessStatus.Denied: return false; } var existing = FindRegistration(); if (existing != null) existing.Unregister(false); return true; } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Common/BootStrapper.cs ================================================ using System; using System.Linq; using Windows.UI.Xaml; using System.Threading.Tasks; using Windows.ApplicationModel; using Windows.UI.Xaml.Controls; using Windows.ApplicationModel.Activation; namespace Template10.Common { // BootStrapper is a drop-in replacement of Application // - OnInitializeAsync is the first in the pipeline, if launching // - OnLaunchedAsync is required, and second in the pipeline // - OnActivatedAsync is first in the pipeline, if activating // - NavigationService is an automatic property of this class public abstract class BootStrapper : Application { /// /// Event to allow views and viewmodels to intercept the Hardware/Shell Back request and /// implement their own logic, such as closing a dialog. In your event handler, set the /// Handled property of the BackRequestedEventArgs to true if you do not want a Page /// Back navigation to occur. /// public event EventHandler BackRequested; public BootStrapper() { this.Resuming += (s, e) => { OnResuming(s, e); }; this.Suspending += async (s, e) => { var deferral = e.SuspendingOperation.GetDeferral(); this.NavigationService.Suspending(); await OnSuspendingAsync(s, e); deferral.Complete(); }; } #region properties public Frame RootFrame { get; set; } public Services.NavigationService.NavigationService NavigationService { get; private set; } protected Func SplashFactory { get; set; } #endregion #region activated protected override async void OnActivated(IActivatedEventArgs e) { await InternalActivatedAsync(e); } protected override async void OnCachedFileUpdaterActivated(CachedFileUpdaterActivatedEventArgs args) { await InternalActivatedAsync(args); } protected override async void OnFileActivated(FileActivatedEventArgs args) { await InternalActivatedAsync(args); } protected override async void OnFileOpenPickerActivated(FileOpenPickerActivatedEventArgs args) { await InternalActivatedAsync(args); } protected override async void OnFileSavePickerActivated(FileSavePickerActivatedEventArgs args) { await InternalActivatedAsync(args); } protected override async void OnSearchActivated(SearchActivatedEventArgs args) { await InternalActivatedAsync(args); } protected override async void OnShareTargetActivated(ShareTargetActivatedEventArgs args) { await InternalActivatedAsync(args); } private async Task InternalActivatedAsync(IActivatedEventArgs e) { await this.OnActivatedAsync(e); Window.Current.Activate(); } #endregion protected override void OnLaunched(LaunchActivatedEventArgs e) { InternalLaunchAsync(e as ILaunchActivatedEventArgs); } private async void InternalLaunchAsync(ILaunchActivatedEventArgs e) { UIElement splashScreen = default(UIElement); if (this.SplashFactory != null) { splashScreen = this.SplashFactory(e.SplashScreen); Window.Current.Content = splashScreen; } this.RootFrame = this.RootFrame ?? new Frame(); this.RootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; this.NavigationService = new Services.NavigationService.NavigationService(this.RootFrame); // the user may override to set custom content await OnInitializeAsync(); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { try { /* TODO: restore state */ } finally { await this.OnLaunchedAsync(e); } } else { await this.OnLaunchedAsync(e); } // if the user didn't already set custom content use rootframe if (Window.Current.Content == splashScreen) { Window.Current.Content = this.RootFrame; } if (Window.Current.Content == null) { Window.Current.Content = this.RootFrame; } Window.Current.Activate(); // Hook up the default Back handler Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested; } /// /// Default Hardware/Shell Back handler overrides standard Back behavior that navigates to previous app /// in the app stack to instead cause a backward page navigation. /// Views or Viewodels can override this behavior by handling the BackRequested event and setting the /// Handled property of the BackRequestedEventArgs to true. /// /// /// private void OnBackRequested(object sender, Windows.UI.Core.BackRequestedEventArgs e) { if (BackRequested != null) { BackRequested(this, e); } if (!e.Handled) { if (this.RootFrame.CanGoBack) { RootFrame.GoBack(); e.Handled = true; } } } #region overrides public virtual Task OnInitializeAsync() { return Task.FromResult(null); } public virtual Task OnActivatedAsync(IActivatedEventArgs e) { return Task.FromResult(null); } public abstract Task OnLaunchedAsync(ILaunchActivatedEventArgs e); protected virtual void OnResuming(object s, object e) { } protected virtual Task OnSuspendingAsync(object s, SuspendingEventArgs e) { return Task.FromResult(null); } #endregion } } ================================================ FILE: BackgroundExecution/ForegroundApp/Converters/DateTimeFormatConverter.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Data; namespace Template10.Converters { class DateTimeFormatConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { try { return System.Convert.ToDateTime(value).ToString(parameter.ToString()); } catch { return value; } } public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Converters/ValueWhenConverter.cs ================================================ using System; using Windows.UI.Xaml.Data; namespace Template10.Converters { class ValueWhenConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { try { if (value.Equals(When)) return this.Value; return this.Otherwise; } catch { return this.Otherwise; } } public object ConvertBack(object value, Type targetType, object parameter, string language) { throw new NotImplementedException(); } public object Value { get; set; } public object Otherwise { get; set; } public object When { get; set; } } } ================================================ FILE: BackgroundExecution/ForegroundApp/ForegroundApp.csproj ================================================  Debug x86 {78846B8C-1024-40A0-B57E-74105AC39342} AppContainerExe Properties Template10 Template10Foreground en-US UAP 10.0.10069.0 10.0.10069.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ForegroundApp_TemporaryKey.pfx true bin\ARM\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full ARM false prompt true bin\ARM\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly ARM false prompt true true true bin\x64\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x64 false prompt true bin\x64\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x64 false prompt true true true bin\x86\Debug\ DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP ;2008 full x86 false prompt true bin\x86\Release\ TRACE;NETFX_CORE;WINDOWS_UAP true ;2008 pdbonly x86 false prompt true true App.xaml MainPage.xaml Designer MSBuild:Compile Designer MSBuild:Compile Designer MSBuild:Compile Designer ..\packages\Newtonsoft.Json.6.0.8\lib\netcore45\Newtonsoft.Json.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll True ..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll True {b410a17c-6a4c-4089-a05b-dfc784fd04ad} BackgroundTask 14.0 This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. ================================================ FILE: BackgroundExecution/ForegroundApp/Models/Models.readme.htm ================================================  Template 10 Help

Template 10 Help

The Models folder

    Models are simple classes that hold data. It is very unusual that a Model has any other functionality (methods or events).

What's a Model?

Most applications use data. It could be a User profile or a Todo item. The record can be persisted in a database or a file - that is up to the developer. But software needs to represent data as a [class]. It could be in a User class or a Todo [class]. This [class] structure is the only way an application can use data. It is the only way it can be loaded into memory. It is up to the developer to figure out how to take the data from their database or file and fill the [class].

Frameworks like Entity Framework can take a database record and put it in a [class]. Other technologies, like JSON deserialization can take the JSON emitted by a REST service (which is only a string) and populate a [class] with it. Whatever method a developer chooses does not matter, data just needs to be represented as a [class].

INotifyPropertyChanged

In XAML data binding, developers can bind properties of a [UIElement] to a Model (which is a [class]). The data binding framework recognizes a [class] and knows how to read its properties and present their values in the user interface. For example, a developer might data bind the FirstName property of the User [class] to the [Text] property of a XAML [TextBlock]. This would present the FirstName to in the user interface.

XAML can data bind in three ways, called modes. [OneTime] binding reads the value of the property when the interface is initially rendered, but never reads it again. The other two, [OneWay] and [TwoWay] binding both require the class implements [INotifyPropertyChanged] so the [PropertyChanged] event is raised when property values change.

This event is not raised automatically. The developer must raise the event manually in the setter of the property. Because of this, bindable properties cannot leverage the automatic property implementation syntax in C#, which looks like: public String FirstName { get; set; } = String.Empty. There has been talk about extending the compiler to support [INotifyPropertyChange] with a simple property attribute, but it is not part of C# 6 or VS 2015.

One implementation

The implementation of [INotifyPropertyChanged] is quite redundant because a developer would implement it about the same way in every Model. Because of this, the implementation is wrapped up in another class and used as the abstract based of every Model. This abstract base is called BindableBase and is located in the BindableBase.cs file in the project's Mvvm folder. This abstract base is the same in every project and many MVVM frameworks ship their own version (which is fundamentally identical).

This folder

The following files represent the types used to implement the TODO functionality in this template. Each of the types in this folder are inside the [Template10.Models] namespace.

  1. States.cs

A TodoItem can be in one of thre states: NotStarted, InProcess, and Done. These states are defined in the States ENUM which resides in the [States.cs] file in this folder. Developers use an ENUM to constrain the possible values of a property to a set list.

  1. TodoItem.cs

A TODO list contains zero or more tasks. In this application, we call those TodoItems. This is a class that has the task's Title, as well as other properties like State and DueDate. A TodoItem is intended to be a member of a TodoList.

  1. TodoList.cs

This TODO application allows the user to create more than one TodoList. For example, the user might create a "grocery" TODO list and a "vacation" TODO list. A TodoItem can be the child of only one TodoList. And, A TodoList can have any number of TodoItems as children.

//End

================================================ FILE: BackgroundExecution/ForegroundApp/Models/TodoItem.cs ================================================ using System; namespace Template10.Models { public class TodoItem : Mvvm.BindableBase { private string _Key = default(string); public string Key { get { return _Key; } set { Set(ref _Key, value); } } private string _Title = default(string); public string Title { get { return _Title; } set { Set(ref _Title, value); } } private DateTime _DueDate = default(DateTime); public DateTime DueDate { get { return _DueDate; } set { Set(ref _DueDate, value); } } private bool _IsComplete = default(bool); public bool IsComplete { get { return _IsComplete; } set { Set(ref _IsComplete, value); } } private string _Details = default(string); public string Details { get { return _Details; } set { Set(ref _Details, value); } } private bool _IsFavorite = default(bool); public bool IsFavorite { get { return _IsFavorite; } set { Set(ref _IsFavorite, value); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Models/TodoList.cs ================================================ using System; using System.Collections.Generic; using System.Collections.ObjectModel; namespace Template10.Models { public class TodoList : Mvvm.BindableBase { private string _Key = Guid.NewGuid().ToString(); public string Key { get { return _Key; } set { Set(ref _Key, value); } } private string _title; public string Title { get { return _title; } set { Set(ref _title, value); } } private ObservableCollection _Items = default(ObservableCollection); public ObservableCollection Items { get { return _Items; } set { Set(ref _Items, value); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Mvvm/BindableBase.cs ================================================ using System.ComponentModel; using System.Runtime.CompilerServices; namespace Template10.Mvvm { public abstract class BindableBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public void RaisePropertyChanged([CallerMemberName]string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } public void Set(ref T storage, T value, [CallerMemberName()]string propertyName = null) { if (!object.Equals(storage, value)) { storage = value; this.RaisePropertyChanged(propertyName); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Mvvm/Command.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace Template10.Mvvm { // http://codepaste.net/jgxazh using System.Diagnostics; public class Command : System.Windows.Input.ICommand { private readonly Action m_Execute; private readonly Func m_CanExecute; public event EventHandler CanExecuteChanged; public Command(Action execute) : this(execute, () => true) { /* empty */ } public Command(Action execute, Func canexecute) { if (execute == null) throw new ArgumentNullException("execute"); m_Execute = execute; m_CanExecute = canexecute; } [DebuggerStepThrough] public bool CanExecute(object p) { try { return m_CanExecute == null ? true : m_CanExecute(); } catch { Debugger.Break(); return false; } } public void Execute(object p) { if (CanExecute(p)) try { m_Execute(); } catch { Debugger.Break(); } } public void RaiseCanExecuteChanged() { if (CanExecuteChanged != null) CanExecuteChanged(this, EventArgs.Empty); } } public class Command : System.Windows.Input.ICommand { private readonly Action m_Execute; private readonly Func m_CanExecute; public event EventHandler CanExecuteChanged; public Command(Action execute) : this(execute, (x) => true) { /* empty */ } public Command(Action execute, Func canexecute) { if (execute == null) throw new ArgumentNullException("execute"); m_Execute = execute; m_CanExecute = canexecute; } [DebuggerStepThrough] public bool CanExecute(object p) { try { var _Value = (T)Convert.ChangeType(p, typeof(T)); return m_CanExecute == null ? true : m_CanExecute(_Value); } catch { Debugger.Break(); return false; } } public void Execute(object p) { if (CanExecute(p)) try { var _Value = (T)Convert.ChangeType(p, typeof(T)); m_Execute(_Value); } catch { Debugger.Break(); } } public void RaiseCanExecuteChanged() { if (CanExecuteChanged != null) CanExecuteChanged(this, EventArgs.Empty); } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Mvvm/ViewModelBase.cs ================================================ using System; using System.Collections.Generic; using Windows.UI.Xaml.Navigation; namespace Template10.Mvvm { public abstract class ViewModelBase : BindableBase, Services.NavigationService.INavigatable { public virtual void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state) { /* nothing by default */ } public virtual void OnNavigatedFrom(Dictionary state, bool suspending) { /* nothing by default */ } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Package.appxmanifest ================================================  ForegroundApp Jerry Assets\StoreLogo.png ================================================ FILE: BackgroundExecution/ForegroundApp/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ForegroundApp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ForegroundApp")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] ================================================ FILE: BackgroundExecution/ForegroundApp/Properties/Default.rd.xml ================================================ ================================================ FILE: BackgroundExecution/ForegroundApp/Repositories/TodoItemRepository.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Template10.Models; namespace Template10.Repositories { public class TodoItemRepository { public Models.TodoItem Factory(string key = null, bool? complete = null, string title = null, DateTime? dueDate = null) { return new Models.TodoItem { Key = key ?? Guid.NewGuid().ToString(), IsComplete = complete ?? false, Title = title ?? string.Empty, }; } public Models.TodoItem Clone(Models.TodoItem item) { return Factory ( Guid.Empty.ToString(), false, item.Title, item.DueDate ); } public IEnumerable Sample(int count = 5) { var random = new Random((int)DateTime.Now.Ticks); foreach (var item in Enumerable.Range(1, count)) { yield return Factory ( Guid.NewGuid().ToString(), false, "Task-" + Guid.NewGuid().ToString(), DateTime.Now.AddHours(random.Next(1, 200)) ); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Repositories/TodoListRepository.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Template10.Models; namespace Template10.Repositories { public class TodoListRepository { List _cache; const string cachekey = "cache-todolist"; Services.FileService.FileService _fileService; Repositories.TodoItemRepository _todoItemRepository; public TodoListRepository() { _fileService = new Services.FileService.FileService(); _todoItemRepository = new TodoItemRepository(); } public async Task> GetAsync() { return _cache ?? (_cache = await _fileService.ReadAsync(cachekey) ?? new List()); } public async Task GetAsync(string key) { return (await this.GetAsync()).FirstOrDefault(x => x.Key.Equals(key)); } public async Task SaveAsync(List list) { await _fileService.WriteAsync(cachekey, list); } public Models.TodoList Factory(string key = null, string title = null, IEnumerable items = null) { return new Models.TodoList { Key = key ?? Guid.NewGuid().ToString(), Title = title ?? Guid.NewGuid().ToString(), Items = new System.Collections.ObjectModel.ObservableCollection(items ?? new Models.TodoItem[] { }), }; } public Models.TodoList Clone(Models.TodoList list) { return Factory ( null, list.Title, list.Items.Select(x => _todoItemRepository.Clone(x)) ); } public IEnumerable Sample(int count = 5) { var random = new Random((int)DateTime.Now.Ticks); foreach (var List in Enumerable.Range(1, count)) { yield return Factory ( Guid.NewGuid().ToString(), "List-" + Guid.NewGuid().ToString(), _todoItemRepository.Sample(random.Next(5, 30)) ); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/FileService/FileHelper.cs ================================================ using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Template10.Services.FileService { class FileHelper { /// Returns if a file is found in the specified storage strategy /// Path of the file in storage /// Location storage strategy /// Boolean: true if found, false if not found public async Task FileExistsAsync(string key, StorageStrategies location = StorageStrategies.Local) { return (await GetIfFileExistsAsync(key, location)) != null; } public async Task FileExistsAsync(string key, Windows.Storage.StorageFolder folder) { return (await GetIfFileExistsAsync(key, folder)) != null; } /// Deletes a file in the specified storage strategy /// Path of the file in storage /// Location storage strategy public async Task DeleteFileAsync(string key, StorageStrategies location = StorageStrategies.Local) { var _File = await GetIfFileExistsAsync(key, location); if (_File != null) await _File.DeleteAsync(); return !(await FileExistsAsync(key, location)); } /// Reads and deserializes a file into specified type T /// Specified type into which to deserialize file content /// Path to the file in storage /// Location storage strategy /// Specified type T public async Task ReadFileAsync(string key, StorageStrategies location = StorageStrategies.Local) { try { // fetch file var _File = await GetIfFileExistsAsync(key, location); if (_File == null) return default(T); // read content var _String = await Windows.Storage.FileIO.ReadTextAsync(_File); // convert to obj var _Result = Deserialize(_String); return _Result; } catch (Exception) { throw; } } /// Serializes an object and write to file in specified storage strategy /// Specified type of object to serialize /// Path to the file in storage /// Instance of object to be serialized and written /// Location storage strategy public async Task WriteFileAsync(string key, T value, StorageStrategies location = StorageStrategies.Local) { // create file var _File = await CreateFileAsync(key, location, Windows.Storage.CreationCollisionOption.ReplaceExisting); // convert to string var _String = Serialize(value); // save string to file await Windows.Storage.FileIO.WriteTextAsync(_File, _String); // result return await FileExistsAsync(key, location); } private async Task CreateFileAsync(string key, StorageStrategies location = StorageStrategies.Local, Windows.Storage.CreationCollisionOption option = Windows.Storage.CreationCollisionOption.OpenIfExists) { switch (location) { case StorageStrategies.Local: return await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFileAsync(key, option); case StorageStrategies.Roaming: return await Windows.Storage.ApplicationData.Current.RoamingFolder.CreateFileAsync(key, option); case StorageStrategies.Temporary: return await Windows.Storage.ApplicationData.Current.TemporaryFolder.CreateFileAsync(key, option); default: throw new NotSupportedException(location.ToString()); } } private async Task GetIfFileExistsAsync(string key, Windows.Storage.StorageFolder folder, Windows.Storage.CreationCollisionOption option = Windows.Storage.CreationCollisionOption.FailIfExists) { Windows.Storage.StorageFile retval; try { retval = await folder.GetFileAsync(key); } catch (System.IO.FileNotFoundException) { System.Diagnostics.Debug.WriteLine("GetIfFileExistsAsync:FileNotFoundException"); return null; } return retval; } /// Returns a file if it is found in the specified storage strategy /// Path of the file in storage /// Location storage strategy /// StorageFile private async Task GetIfFileExistsAsync(string key, StorageStrategies location = StorageStrategies.Local, Windows.Storage.CreationCollisionOption option = Windows.Storage.CreationCollisionOption.FailIfExists) { Windows.Storage.StorageFile retval; try { switch (location) { case StorageStrategies.Local: retval = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(key); break; case StorageStrategies.Roaming: retval = await Windows.Storage.ApplicationData.Current.RoamingFolder.GetFileAsync(key); break; case StorageStrategies.Temporary: retval = await Windows.Storage.ApplicationData.Current.TemporaryFolder.GetFileAsync(key); break; default: throw new NotSupportedException(location.ToString()); } } catch (System.IO.FileNotFoundException) { System.Diagnostics.Debug.WriteLine("GetIfFileExistsAsync:FileNotFoundException"); return null; } return retval; } private string Serialize(T item) { return JsonConvert.SerializeObject(item, Formatting.None, new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.Objects, TypeNameAssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple }); } private T Deserialize(string json) { return JsonConvert.DeserializeObject(json); } public enum StorageStrategies { Local, Roaming, Temporary } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/FileService/FileService.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Template10.Services.FileService { class FileService { FileHelper _helper = new FileHelper(); public async Task> ReadAsync(string key) { try { return await _helper.ReadFileAsync>(key, FileHelper.StorageStrategies.Roaming); } catch { return new List(); } } public async Task WriteAsync(string key, List items) { await _helper.WriteFileAsync(key, items, FileHelper.StorageStrategies.Roaming); } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/NavigationService/INavigatable.cs ================================================ using System.Collections.Generic; using Windows.UI.Xaml.Navigation; namespace Template10.Services.NavigationService { public interface INavigatable { void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state); void OnNavigatedFrom(Dictionary state, bool suspending); } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/NavigationService/NavigationEventArgs.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Navigation; namespace Template10.Services.NavigationService { public class NavigationEventArgs : EventArgs { public NavigationMode NavigationMode { get; set; } public string Parameter { get; set; } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/NavigationService/NavigationFacade.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media.Animation; using Windows.UI.Xaml.Navigation; namespace Template10.Services.NavigationService { public class NavigationFacade { public NavigationFacade(Frame frame) { _frame = frame; _navigatedEventHandlers = new List>(); // setup animations var c = new TransitionCollection { }; var t = new NavigationThemeTransition { }; //var i = new EntranceNavigationTransitionInfo(); //t.DefaultNavigationTransitionInfo = i; c.Add(t); _frame.ContentTransitions = c; } #region frame facade readonly Frame _frame; public bool Navigate(Type page, string parameter) { return _frame.Navigate(page, parameter); } public void SetNavigationState(string state) { _frame.SetNavigationState(state); } public string GetNavigationState() { return _frame.GetNavigationState(); } public int BackStackDepth { get { return _frame.BackStackDepth; } } public bool CanGoBack { get { return _frame.CanGoBack; } } public void GoBack() { _frame.GoBack(); } public void Refresh() { var page = this.CurrentPageType; var param = this.CurrentPageParam; this._frame.BackStack.Remove(this._frame.BackStack.Last()); this.Navigate(page, param); } public bool CanGoForward { get { return _frame.CanGoForward; } } public void GoForward() { _frame.GoForward(); } public object Content { get { return _frame.Content; } } public Type CurrentPageType { get; internal set; } public string CurrentPageParam { get; internal set; } public object GetValue(DependencyProperty dp) { return _frame.GetValue(dp); } public void SetValue(DependencyProperty dp, object value) { _frame.SetValue(dp, value); } public void ClearValue(DependencyProperty dp) { _frame.ClearValue(dp); } #endregion readonly List> _navigatedEventHandlers; public event EventHandler Navigated { add { if (!_navigatedEventHandlers.Contains(value)) { _navigatedEventHandlers.Add(value); if (_navigatedEventHandlers.Count == 1) _frame.Navigated += FacadeNavigatedEventHandler; } } remove { if (_navigatedEventHandlers.Contains(value)) { _navigatedEventHandlers.Remove(value); if (_navigatedEventHandlers.Count == 0) _frame.Navigated -= FacadeNavigatedEventHandler; } } } void FacadeNavigatedEventHandler(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e) { foreach (var handler in _navigatedEventHandlers) { var args = new NavigationEventArgs() { NavigationMode = e.NavigationMode, Parameter = (e.Parameter == null) ? string.Empty : e.Parameter.ToString() }; handler(this, args); } this.CurrentPageType = e.SourcePageType; this.CurrentPageParam = e.Parameter as String; } readonly List _navigatingEventHandlers = new List(); public event EventHandler Navigating { add { if (!_navigatingEventHandlers.Contains(value)) { _navigatingEventHandlers.Add(value); if (_navigatingEventHandlers.Count == 1) _frame.Navigating += FacadeNavigatingCancelEventHandler; } } remove { if (_navigatingEventHandlers.Contains(value)) { _navigatingEventHandlers.Remove(value); if (_navigatingEventHandlers.Count == 0) _frame.Navigating -= FacadeNavigatingCancelEventHandler; } } } private void FacadeNavigatingCancelEventHandler(object sender, NavigatingCancelEventArgs e) { foreach (var handler in _navigatingEventHandlers) { handler(this, new EventArgs()); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Services/NavigationService/NavigationService.cs ================================================ using System; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace Template10.Services.NavigationService { public class NavigationService { private readonly NavigationFacade _frame; private const string EmptyNavigation = "1,0"; string LastNavigationParameter { get; set; /* TODO: persist */ } string LastNavigationType { get; set; /* TODO: persist */ } public NavigationService(Frame frame) { _frame = new NavigationFacade(frame); _frame.Navigating += (s, e) => NavigateFrom(false); _frame.Navigated += (s, e) => NavigateTo(e.NavigationMode, e.Parameter); } void NavigateFrom(bool suspending) { var page = _frame.Content as FrameworkElement; if (page != null) { var dataContext = page.DataContext as INavigatable; if (dataContext != null) { dataContext.OnNavigatedFrom(null, suspending); } } } void NavigateTo(NavigationMode mode, string parameter) { LastNavigationParameter = parameter; LastNavigationType = _frame.Content.GetType().FullName; if (mode == NavigationMode.New) { // TODO: clear existing state } var page = _frame.Content as FrameworkElement; if (page != null) { var dataContext = page.DataContext as INavigatable; if (dataContext != null) { dataContext.OnNavigatedTo(parameter, mode, null); } } } public bool Navigate(Type page, string parameter = null) { if (page == null) throw new ArgumentNullException(nameof(page)); if (page.FullName.Equals(LastNavigationType) && parameter == LastNavigationParameter) return false; return _frame.Navigate(page, parameter); } public void RestoreSavedNavigation() { /* TODO */ } public void GoBack() { if (_frame.CanGoBack) _frame.GoBack(); } public bool CanGoBack { get { return _frame.CanGoBack; } } public void GoForward() { _frame.GoForward(); } public bool CanGoForward { get { return _frame.CanGoForward; } } public void ClearHistory() { _frame.SetNavigationState(EmptyNavigation); } public void Suspending() { NavigateFrom(true); } public void Show(SettingsFlyout flyout, string parameter = null) { if (flyout == null) throw new ArgumentNullException(nameof(flyout)); var dataContext = flyout.DataContext as INavigatable; if (dataContext != null) { dataContext.OnNavigatedTo(parameter, NavigationMode.New, null); } flyout.Show(); } public Type CurrentPageType { get { return _frame.CurrentPageType; } } public string CurrentPageParam { get { return _frame.CurrentPageParam; } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Styles/StarRadioButtonStyle.xaml ================================================  ================================================ FILE: BackgroundExecution/ForegroundApp/ViewModels/MainPageViewModel.cs ================================================ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; using Template10.Mvvm; using Windows.ApplicationModel.Background; using Windows.Foundation.Collections; using Windows.UI.Xaml.Navigation; namespace Template10.ViewModels { public class MainPageViewModel : Mvvm.ViewModelBase { Repositories.TodoListRepository _todoListRepository; public MainPageViewModel() { _todoListRepository = new Repositories.TodoListRepository(); if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) { // designtime sample data var data = _todoListRepository.Sample().Select(x => new ViewModels.TodoListViewModel(x)); this.TodoLists = new ObservableCollection(data); } else { // update commands this.PropertyChanged += (s, e) => { this.AddListCommand.RaiseCanExecuteChanged(); this.RemoveListCommand.RaiseCanExecuteChanged(); }; } } public override async void OnNavigatedTo(string parameter, NavigationMode mode, Dictionary state) { LoadCommand.Execute(null); // register background tasks await BackgroundHelper.Register(new SystemTrigger(SystemTriggerType.TimeZoneChange, false)); } public override void OnNavigatedFrom(Dictionary state, bool suspending) { SaveCommand.Execute(null); } bool _busy = false; public bool Busy { get { return _busy; } set { Set(ref _busy, value); } } private ObservableCollection _TodoLists = new ObservableCollection(); public ObservableCollection TodoLists { get { return _TodoLists; } private set { Set(ref _TodoLists, value); } } #region Commands Mvvm.Command _AddListCommand = default(Mvvm.Command); public Mvvm.Command AddListCommand { get { return _AddListCommand ?? (_AddListCommand = new Mvvm.Command(ExecuteAddListCommand, CanExecuteAddListCommand)); } } private bool CanExecuteAddListCommand() { return !Busy; } private void ExecuteAddListCommand() { try { var item = new ViewModels.TodoListViewModel(_todoListRepository.Factory(title: "New List")); this.TodoLists.Insert(0, item); SaveCommand.Execute(null); } catch { } } Mvvm.Command _RemoveListCommand = default(Mvvm.Command); public Mvvm.Command RemoveListCommand { get { return _RemoveListCommand ?? (_RemoveListCommand = new Mvvm.Command(ExecuteRemoveListCommand, CanExecuteRemoveListCommand)); } } private bool CanExecuteRemoveListCommand(ViewModels.TodoListViewModel list) { return !Busy && list != null; } private void ExecuteRemoveListCommand(ViewModels.TodoListViewModel list) { try { var index = this.TodoLists.IndexOf(list); this.TodoLists.Remove(list); SaveCommand.Execute(null); } catch { } } Mvvm.Command _LoadCommand = default(Mvvm.Command); public Mvvm.Command LoadCommand { get { return _LoadCommand ?? (_LoadCommand = new Mvvm.Command(ExecuteLoadCommand, CanExecuteLoadCommand)); } } private bool CanExecuteLoadCommand() { return !Busy; } private async void ExecuteLoadCommand() { try { Busy = true; await Task.Delay(2000); var data = _todoListRepository.Sample(10).Select(x => new ViewModels.TodoListViewModel(x)); this.TodoLists.Clear(); foreach (var item in data.OrderBy(x => x.TodoList.Title)) { this.TodoLists.Add(item); } } finally { Busy = false; } } Mvvm.Command _SaveCommand = default(Mvvm.Command); public Mvvm.Command SaveCommand { get { return _SaveCommand ?? (_SaveCommand = new Mvvm.Command(ExecuteSaveCommand, CanExecuteSaveCommand)); } } private bool CanExecuteSaveCommand() { return true; } private async void ExecuteSaveCommand() { while (Busy) { await Task.Delay(100); } try { Busy = true; await Task.Delay(2000); await _todoListRepository.SaveAsync(this.TodoLists.Select(x => x.TodoList).ToList()); } finally { Busy = false; } } Mvvm.Command _UpdateBadgeCommand = default(Mvvm.Command); public Mvvm.Command UpdateBadgeCommand { get { return _UpdateBadgeCommand ?? (_UpdateBadgeCommand = new Mvvm.Command(ExecuteUpdateBadgeCommand, CanExecuteUpdateBadgeCommand)); } } private bool CanExecuteUpdateBadgeCommand(string value) { return true; } private async void ExecuteUpdateBadgeCommand(string value) { try { Busy = true; var number = default(int); if (!int.TryParse(value, out number)) return; await Task.Delay(2000); // TODO: update Badge (call update Badge background task) } finally { Busy = false; } } Mvvm.Command _UpdateTileCommand = default(Mvvm.Command); public Mvvm.Command UpdateTileCommand { get { return _UpdateTileCommand ?? (_UpdateTileCommand = new Mvvm.Command(ExecuteUpdateTileCommand, CanExecuteUpdateTileCommand)); } } private bool CanExecuteUpdateTileCommand(string value) { return true; } private async void ExecuteUpdateTileCommand(string value) { try { Busy = true; var number = default(int); if (!int.TryParse(value, out number)) return; await Task.Delay(2000); var trigger = new ApplicationTrigger(); var task = await BackgroundHelper.Register(trigger); task.Completed += (s,e)=> { Busy = false; }; var allowed = await trigger.RequestAsync(); if (allowed != ApplicationTriggerResult.Allowed) { // it was not allowed to run Busy = false; } } catch { Busy = false; } } #endregion } } ================================================ FILE: BackgroundExecution/ForegroundApp/ViewModels/TodoItemViewModel.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using Template10.Models; namespace Template10.ViewModels { public class TodoItemViewModel : Mvvm.ViewModelBase { public TodoItemViewModel(Models.TodoItem todo) { this.TodoItem = todo; } private Models.TodoItem _TodoItem = default(Models.TodoItem); public Models.TodoItem TodoItem { get { return _TodoItem; } set { Set(ref _TodoItem, value); } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/ViewModels/TodoListViewModel.cs ================================================ using System; using System.Collections.ObjectModel; namespace Template10.ViewModels { public class TodoListViewModel : Mvvm.ViewModelBase { Repositories.TodoItemRepository _todoItemRepository; public TodoListViewModel(Models.TodoList list) { _todoItemRepository = new Repositories.TodoItemRepository(); this.TodoList = list; foreach (var item in list.Items) { this.Items.Add(new ViewModels.TodoItemViewModel(item)); } } private Models.TodoList _TodoList = default(Models.TodoList); public Models.TodoList TodoList { get { return _TodoList; } set { Set(ref _TodoList, value); } } private ObservableCollection _Items = new ObservableCollection(); public ObservableCollection Items { get { return _Items; } private set { Set(ref _Items, value); } } private ViewModels.TodoItemViewModel _SelectedItem = default(ViewModels.TodoItemViewModel); public ViewModels.TodoItemViewModel SelectedItem { get { return _SelectedItem; } set { Set(ref _SelectedItem, value); SelectedItemIsSelected = (value != null); } } private bool _SelectedItemIsSelected = default(bool); public bool SelectedItemIsSelected { get { return _SelectedItemIsSelected; } set { Set(ref _SelectedItemIsSelected, value); } } Mvvm.Command _AddCommand = default(Mvvm.Command); public Mvvm.Command AddCommand { get { return _AddCommand ?? (_AddCommand = new Mvvm.Command(ExecuteAddCommand, CanExecuteAddCommand)); } } private bool CanExecuteAddCommand(string title) { return true; } private void ExecuteAddCommand(string title) { try { var index = this.Items.IndexOf(this.SelectedItem); var item = new ViewModels.TodoItemViewModel(_todoItemRepository.Factory(title: title)); this.TodoList.Items.Insert((index > -1) ? index : 0, item.TodoItem); this.Items.Insert((index > -1) ? index : 0, item); this.SelectedItem = item; } catch { this.SelectedItem = null; } } Mvvm.Command _RemoveCommand = default(Mvvm.Command); public Mvvm.Command RemoveCommand { get { return _RemoveCommand ?? (_RemoveCommand = new Mvvm.Command(ExecuteRemoveCommand, CanExecuteRemoveCommand)); } } private bool CanExecuteRemoveCommand(Models.TodoItem param) { return this.SelectedItem != null; } private void ExecuteRemoveCommand(Models.TodoItem param) { try { var index = this.Items.IndexOf(this.SelectedItem); this.TodoList.Items.Remove(this.SelectedItem.TodoItem); this.Items.Remove(this.SelectedItem); this.SelectedItem = this.Items[index]; } catch { this.SelectedItem = null; } } } } ================================================ FILE: BackgroundExecution/ForegroundApp/Views/MainPage.xaml ================================================