Deployment.Current.Dispatcher.BeginInvoke(delegate
{
Application.Current.RootVisual = new MainPage();
});
Deployment.Current.Dispatcher.BeginInvoke(delegate
{
Application.Current.RootVisual = new MainPage();
});