You are working with an existing Windows Presentation Foundation (WPF) application in Microsoft Visual Studio 2010. The WPF application requires approximately one minute to initialize before displaying its main window.
You have the following requirements:
Immediately display a splash screen when the WPF application launches. Allow for the display of an initialization progress bar on the splash screen. Close the splash screen when the WPF application is ready to display the main window.
You need to recommend an approach for meeting the requirements.
What should you recommend?
A.
Launch a custom splash screen by using a Window object. When the initialization completes, launch the main window from the splash screen.
B.
Create a SplashScreen object. Display the object in the code-behind of the App.xaml file.
C.
Move the initialization code to the code-behind of the main window.
D.
Compile an image into the WPF application with a Build Action value of SplashScreen.
B is the correct answer here, not A – App.xaml.cs is where you launch the SplashScreen.
I agree with Answer A. It seems that SplashScreen object does not exist in .Net – so it cannot be B.
SplashScreen absolutely exists in .NET, but you can only add images to it, so it’s still the wrong answer. A is the closest to being correct here.
https://msdn.microsoft.com/en-us/library/system.windows.splashscreen%28v=vs.110%29.aspx
D is the correct answer:
http://msdn.microsoft.com/en-us/library/cc656886.aspx
You can’t add a progress bar on an image. Even if you want to add simple text, you have to add it TO the image. It’s a nasty question.