I used this method (from msdn) to extend splashscreen in my app but while navigating after showing extended splash screen it is throwing error.
Error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))
Code:
void DismissedEventHandler(SplashScreen sender, object e)
{
dismissed = true;
/*
Here I will load data from web
*/
//Here i am unable to navigate on MainPage
rootFrame.Navigate(typeof(MainPage), LoadedData);
Window.Current.Content = rootFrame;
}
If you need more code then its same as of above mention link.
So how can navigate to MainPage?
You can dispatch the navigation to run on the UI thread with Dispatcher.RunAsync https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.coredispatcher.runasync.aspx
User contributions licensed under CC BY-SA 3.0