Examples/NativeGameraww/CSharpGameraww/MainPage.xaml.cs
/// <summary>
///     Invoked when this page is about to be displayed in a Frame.
/// </summary>
/// <param name="e">
///     Event data that describes how this page was reached.
///     This parameter is typically used to configure the page.
/// </param>
Invoked when this page is about to be displayed in a Frame.
Invoked when this page is about to be displayed in a Frame .
protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var client = new HttpClient();
            Task.Run(async () =>
            {
                var response = await client.GetStringAsync("http://www.reddit.com/r/aww.json?limit=50");
                var json = JsonObject.Parse(response);
                await
                    CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                        () => { DataContext = new JsonPropertyProvider(json); });
            });
        }
protected override void OnNavigatedTo ( NavigationEventArgs e ) { var client = new HttpClient ( ) ; Task . Run ( async ( ) => { var response = await client . GetStringAsync ( " " ) ; var json = JsonObject . Parse ( response ) ; await CoreApplication . MainView . CoreWindow . Dispatcher . RunAsync ( CoreDispatcherPriority . Normal , ( ) => { DataContext = new JsonPropertyProvider ( json ) ; } ) ; } ) ; }
Invoked when this page is about to be displayed in a Frame.
Invoked when this page is about to be displayed in a Frame .
e
NavigationEventArgs
Event data that describes how this page was reached.
This parameter is typically used to configure the page.
Event data that describes how this page was reached . This parameter is typically used to configure the page .