diff --git a/src/wp/SplashScreen.cs b/src/wp/SplashScreen.cs index feb4038..1c33c94 100644 --- a/src/wp/SplashScreen.cs +++ b/src/wp/SplashScreen.cs @@ -135,10 +135,9 @@ namespace WPCordovaClassLib.Cordova.Commands public void show(string options = null) { - - if (!popup.IsOpen) + Deployment.Current.Dispatcher.BeginInvoke(() => { - Deployment.Current.Dispatcher.BeginInvoke(() => + if (!popup.IsOpen) { popup.Child.Opacity = 0; @@ -162,17 +161,16 @@ namespace WPCordovaClassLib.Cordova.Commands { StartAutoHideTimer(); } - }); - } + } + }); } public void hide(string options = null) { - if (popup.IsOpen) + Deployment.Current.Dispatcher.BeginInvoke(() => { - Deployment.Current.Dispatcher.BeginInvoke(() => + if (popup.IsOpen) { - popup.Child.Opacity = 1.0; Storyboard story = new Storyboard(); @@ -191,8 +189,8 @@ namespace WPCordovaClassLib.Cordova.Commands popup.IsOpen = false; }; story.Begin(); - }); - } + } + }); } private void StartAutoHideTimer()