WPF SplashScreen ,如何使启动画面显示的时间更长

WPF SplashScreen ,如何使启动画面显示的时间更长

问题描述:

我发现只有一种方法可以延长初始显示时间.

I found only one way to make splash display time longer.

这是将 ApplicationDefinition 更改为 Page 并进行配置的时候了.

That is changing ApplicationDefinition to Page and configuration it's time.

但是我需要ApplicationDefinition,我在这里有定位器,如果我使用页面,它就会丢失.

But I need ApplicationDefinition, I got locator here and it lost if I use page.

所以我想让 SpashScreen 在显示主窗体之前显示时间和延迟更长,但我也想保存 ApplicationDefinition.

So I want to make SpashScreen display time and delay before showing main form longer but I also want to save ApplicationDefinition.

谢谢.

使用显式方式显示启动画面 并将 false 传递给 Show 方法.

Use the explicit way of showing the splash screen and pass false to the Show method.

那样的话,当您想要关闭启动画面时,您必须显式调用 Close().

That way you have to call Close() explicitly when you want the splash to close.