Error while navigating from extended splash screen in WP8.1RT

0

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?

windows-runtime
windows-phone-8.1
splash-screen
asked on Stack Overflow Aug 7, 2015 by Janak

1 Answer

0

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

answered on Stack Overflow Aug 7, 2015 by Rob Caplan - MSFT

User contributions licensed under CC BY-SA 3.0