Reputation:
In my caliburn micro based MVVM application, I am showing Splash Screen in App.xaml.cs file as follows:
protected override void OnStartup(StartupEventArgs e)
{
SplashScreen splashScreen = new SplashScreen("SplashScreenTemplate.png");
splashScreen.Show(true, true);
base.OnStartup(e);
}
I also want to display text information (for example: expiration date) on this splash screen. Is it possible? How can I implement this behavior.
Thanks
Upvotes: 3
Views: 4449
Reputation: 69979
The built in Splash Screen functionality in WPF is very limited... you can add an image that the Framework will display as the application is loading and that's it. If you want to have text on the image, then you'll need to save the image with the text on it.
If you're talking about the text that updates and shows what is being loaded as it is being loaded, then you'll have to declare your own Window
with an image and one or more TextBlock
elements, start that first and then start your MainWindow
class when ready. If that is the case, then you can find more details on how to implement this from the Creating an animated splash screen like office 2010 post here on StackOverflow.
Upvotes: 2