SplashScreen s = new SplashScreen(System.Reflection.Assembly.GetExecutingAssembly(),"splash.png");
s.Show(false);
Run Code Online (Sandbox Code Playgroud)
调用s.Show()参数是否为false或时true,它将IOException
与消息一起抛出
找不到资源“ splash.png”
即使将splash.png添加到资源中,并且其Build Action是Resource。
在WPF中使用图像以及Image控件时,我已经注意到许多问题。