fixes Splashscreen crash on WP8

The UI elements cannot be accessed from any other than the UI thread directly. So, enclose UI access code in the Dispatcher.BeginInvoke()
This commit is contained in:
Nadya Atanasova 2014-06-19 12:21:48 +03:00 committed by sgrebnov
parent c56bb9efec
commit 1f50d90d9e

View File

@ -95,13 +95,13 @@ namespace WPCordovaClassLib.Cordova.Commands
public void show(string options = null)
{
if (popup.IsOpen)
{
return;
}
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
if (popup.IsOpen)
{
return;
}
popup.Child.Opacity = 0;
Storyboard story = new Storyboard();
@ -137,13 +137,13 @@ namespace WPCordovaClassLib.Cordova.Commands
public void hide(string options = null)
{
if (!popup.IsOpen)
{
return;
}
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
if (!popup.IsOpen)
{
return;
}
popup.Child.Opacity = 1.0;
Storyboard story = new Storyboard();