Navigate from extended splash screen when app is loaded

时间秒杀一切 提交于 2019-12-13 19:34:28

问题


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



来源:https://stackoverflow.com/questions/21343833/navigate-from-extended-splash-screen-when-app-is-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!