示例#1
0
 /// <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.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     // Start rendering animated DirectX content on a background thread, which reduces load on the UI thread
     // and can help keep the app responsive to user input.
     DirectXPanel1.StartRenderLoop();
     DirectXPanel2.StartRenderLoop();
 }
示例#2
0
 /// <summary>
 /// Invoked when this page will no longer be displayed in a Frame.
 /// </summary>
 /// <param name="e"></param>
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     // Stop rendering DirectX content when it will no longer be on screen.
     DirectXPanel1.StopRenderLoop();
     DirectXPanel2.StopRenderLoop();
 }