Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26144383 --- Diff: src/wp/SplashScreen.cs --- @@ -40,26 +40,35 @@ namespace WPCordovaClassLib.Cordova.Commands /// </summary> public class SplashScreen : BaseCommand { + private readonly Preferences preferences = new Preferences(); private Popup popup; - private bool autohide = true; private static bool WasShown = false; public SplashScreen() { - Image SplashScreen = new Image(); - BitmapImage splash_image = new BitmapImage(); - splash_image.SetSource(Application.GetResourceStream(new Uri(@"SplashScreenImage.jpg", UriKind.Relative)).Stream); - SplashScreen.Source = splash_image; + this.LoadPreferencesFromConfiguration(); + + Image SplashScreen = new Image() + { + Height = Application.Current.Host.Content.ActualHeight, + Width = Application.Current.Host.Content.ActualWidth, + Stretch = Stretch.Fill + }; + + var imageResource = Application.GetResourceStream(preferences.SplashScreenImage); + if (imageResource != null) + { + BitmapImage splash_image = new BitmapImage(); + splash_image.SetSource(imageResource.Stream); + SplashScreen.Source = splash_image; + } // Instansiate the popup and set the Child property of Popup to SplashScreen - popup = new Popup() {IsOpen = false, Child = SplashScreen }; + this.popup = new Popup() { IsOpen = false, Child = SplashScreen }; --- End diff -- Nit: prefixed use of "this" when referring to members isn't bad, but is unnecessary.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org