protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ShellWindow shellWindow = new ShellWindow(); StartWindow startWindow = new StartWindow(); Task.Run(() => { Thread.Sleep(3000); this.Dispatcher.Invoke(() => { startWindow.Close(); }); }); startWindow.ShowDialog(); shellWindow.Show(); }