gpt4 book ai didi

wpf - WPF SplashScreen实现

转载 作者:行者123 更新时间:2023-12-04 13:15:21 26 4
gpt4 key购买 nike

我尝试在WPF中实现Splash Screnn。我在MSDN中找到了一些不错的方法,但是有一个地方:

private void _applicationInitialize(SplashScreen splashWindow)
{

Thread.Sleep(1000);

// Create the main window, but on the UI thread.

Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Invoker)delegate
{

Window1 MainWindow = new Window1();

Helper.setWin(MainWindow);

MainWindow.Show();

});

}

问题是 帮助程序,该类是什么以及必须如何实现。有人可以粘贴示例或其他内容吗?

最佳答案

还有一种更简单的方法:

http://msdn.microsoft.com/en-us/library/cc656886.aspx

  1. Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
  2. In Solution Explorer, select the image.
  3. In the Properties window, click the drop-down arrow for the Build Action property.
  4. Select SplashScreen from the drop-down list

关于wpf - WPF SplashScreen实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1741922/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com