/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used when the application is launched to open a specific file, to display /// search results, and so forth. /// </summary> /// <param name="args">Details about the launch request and process.</param> protected override async void OnLaunched(LaunchActivatedEventArgs args) { notificationClient = new NotificationClient(ApplicationId, DeviceId, ServiceEnpointsUrl); var registerOperation = notificationClient.Register(); registerOperation.Completed = ((info, status) => { var channel = info.GetResults(); var error = notificationClient.Error.ErrorMessage; }); // TODO: Create a data model appropriate for your problem domain to replace the sample data string responseText = await GetjsonStream(); // Get Search Pane object searchPane = SearchPane.GetForCurrentView(); // Register for Search Pane QuerySubmitted event //this.searchPane.QuerySubmitted += new TypedEventHandler<SearchPane, SearchPaneQuerySubmittedEventArgs>(); JsonDataSource sampleData = ParseJson(responseText, "Kjoler"); if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Create a Frame to act navigation context and navigate to the first page, // configuring the new page by passing required information as a navigation // parameter var rootFrame = new Frame(); rootFrame.Navigate(typeof (GroupedItemsPage), sampleData.ItemGroups); // Place the frame in the current Window and ensure that it is active Window.Current.Content = rootFrame; Window.Current.Activate(); }