As you know we can visualize and customize Splash screen for a silverlight application. When the loading of silverlight application takes more than 500 millisecond, by default silverlight shows a splash screen of blinking circles and progress percentage. But have you ever seen a splash screen for small application(taking less than 500 milliseconds)? Do you have the curiosity to check for small application?
Please try out like this.
In App.xaml.cs file comment out initialization of RootVisual property like this:
privatevoid Application_Startup(object sender, StartupEventArgs e)
//this.RootVisual = new MainPage();
Now silverlight application start-up page will not appear and you will see only the progress percentage as 100% in splash screen. So here only you can only check the splash screen by downloading .xap file. Now lets check out how to customize that splash screen.
Customizing Splash Screen:
Here we need a new xaml file lets say SplashScreen.xaml. This must be the part of web project (e.g: SilverlightApplication.web). This file is not included under SilverlightApplication.xap file because this needs to be shown when the .xap file is in the process of downloading.
1: Right click on SilverlightApplication.web → Add –>New Item.
Then choose Silverlight1.0JscriptPage under silverlight template. Name it as SplashScreen.xaml. Add those particular elements and style you want to show. Visual studio assumes it as a basic Silverlight1.0 application.
**Note: Do not use elements that are defined by add-ons. Ex: under System.Windows.Controls.dll assembly because these are packaged under .xap.
function onSourceDownloadProgressChanged(sender, eventArgs)
<objectdata=”data:application/x-silverlight-2,”type=”application/x-silverlight- 2″width=”100%” height=”100%”>
We will get a new custom splash screen now. Is it not interesting?