Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在启动屏幕(System.Windows.SplashScreen)上放置文本?_C#_Wpf_Mvvm - Fatal编程技术网

C# 如何在启动屏幕(System.Windows.SplashScreen)上放置文本?

C# 如何在启动屏幕(System.Windows.SplashScreen)上放置文本?,c#,wpf,mvvm,C#,Wpf,Mvvm,在我基于caliburn micro的MVVM应用程序中,我在App.xaml.cs文件中显示启动屏幕,如下所示: protected override void OnStartup(StartupEventArgs e) { SplashScreen splashScreen = new SplashScreen("SplashScreenTemplate.png"); splashScreen.Show(true, true); base.OnStartup(e);

在我基于caliburn micro的MVVM应用程序中,我在App.xaml.cs文件中显示启动屏幕,如下所示:

protected override void OnStartup(StartupEventArgs e)
{
    SplashScreen splashScreen = new SplashScreen("SplashScreenTemplate.png");
    splashScreen.Show(true, true);
    base.OnStartup(e);
}
我还想在此初始屏幕上显示文本信息(例如:过期日期)。可能吗?如何实现此行为


谢谢

WPF中内置的闪屏功能非常有限。。。您可以添加一个图像,该图像将在应用程序加载时显示,仅此而已。如果要在图像上显示文本,则需要将图像与文本一起保存


如果您谈论的是在加载时更新并显示加载内容的文本,那么您必须使用图像和一个或多个
TextBlock
元素声明自己的
Window
,首先启动该文本,然后在准备好后启动
MainWindow
类。如果是这种情况,那么您可以从StackOverflow上的帖子中找到更多关于如何实现此功能的详细信息。

如果此答案帮助您解决了问题,请[将其标记为已接受[()]。