Idea behind implementation
The idea is to put a popup till the start page is ready.
- Open a user control in popup
- Cut Splash Screen image with dimension 800x460 from the popup
- Make visible popup till the start page of the application is not ready
Create User Control
First, you need to create a UserControl for the Splash Screen with a Progress
Bar. In the UserControl, let us put the below three controls in a Grid.
- Image Control to display Image
- TextBlock to display text
- ProgressBar to display progress status.
I am putting the above controls in a Grid with proper
margins to display them vertically. The XAML of UserControl is below,
I have given the name of the UserControl as debugmodeSplashScreen
Opening UserControl in Popup
The below function will open a user control in a popup. You need to call the below function
inside the constructor of the application start page.
Create Splash Screen Image from Popup
Make sure you are calling the function OpenUserControlPopup in the constructor of
the application start page and then while running in emulator
- Take a screen shot of popup in emulator
- Paste screen shot in paint
- By pressing Ctrl+W set width and height of the image as 480x800 Pixels.
- Save the image with the name SplashScreenImage.jpg
- Right click on the project and add existing item. Select above saved image [from step 4] and add in the project.
Calling Service and Downloading data on
You need to make a call to the service and download data in a background thread. Once
data is downloaded, set the popup visibility to false. Create a function to load
data and instantiate a background thread in that.
In Do work you need to make a call to WCF service.
Till application is calling service and downloading data usercontrol in popup
will be visible. Putting all the codes together, code behind for the application
start page would be as below,
public partial class MainPage
sender, RunWorkerCompletedEventArgs e)
sender, DoWorkEventArgs e)
// call service here .
Service1Client proxy =
sender, GetDataCompletedEventArgs e)
//Service result return
On running you should get splash screen with progress bar as below,
This is what all you need to do have a slash screen with progress bar in your
application. I hope this post is useful. Thanks for reading.