Navigate from extended splash screen when app is l

2019-07-30 01:01发布

问题:

I am pulling data from a website with webview and later parse it with HtmlAgillityPack to display info on the app. Because the update of the xaml controls takes time, I wish to use the extended splash screen to delay the display of the main page until it is completely loaded and populated with information from web.

My question now is how do I switch from the extended splash to the main page once this one is filled with the parsed data?

回答1:

  1. If you are resuming from a suspended state and are using the SuspensionManager, call SuspensionManager.RestoreAsync() and then set the Windows.Current.Content to the root frame
  2. If you are starting new, create a root frame, navigate to the starting page, then set the Windows.Current.Content to the root frame

Here is a sample that I used to add an extended splash screen to my app, Time-Lapse:

Windows 8 Splash Screen Sample