I found only one way to make splash display time longer.
That is changing ApplicationDefinition to Page and configuration it\'s time.
But I need ApplicationDefin
Use the explicit way of showing the splash screen and pass false to the Show method.
That way you have to call Close() explicitly when you want the splash to close.
Another approach is to find the App.g.cs file and its Main():
public static void Main() {
SplashScreen splashScreen = new SplashScreen("splash.jpg");
splashScreen.Show(true);
Thread.Sleep(3000);
someNameSpace.App app = new someNameSpace.App();
app.Run();
}
Where the only newly added field is Thread.Sleep(3000);
, which will delay the showing of the splash screen by 3 seconds.
You can use, as Jake Glines wrote, System.Threading
using System.Threading;
public MainWindow()
{
SplashScreen splash = new SplashScreen("splash.jpg");
splash.Show(true);
Thread.Sleep(1500);
InitializeComponent();
}
Or you can use timer/progressbar on it, and make it depend on real loading, not just imaginary.
I opened the App.xaml file, and made these changes to "delay" the showing.
public partial class App : Application
{
App()
{
// Pause to show the splash screen for 3 seconds
System.Threading.Thread.Sleep(3000);
}
}