WPF:透明的Splashscreen闪烁,为什么?

时间:2016-05-31 06:43:48

标签: c# wpf png transparency splash-screen

我正在使用Visual Studio 2013,并且可以重现以下行为:

  1. 创建新的WPF应用程序
  2. 向我的项目添加透明PNG,并从Build Action菜单中选择“Splashscreen”
  3. 使Mainwindow足够大,以便SplashScreen在启动时与Mainwindow重叠
  4. 当我构建并启动该应用程序时会发生什么:启动闪屏,停留一段时间,当主窗口被绘制时消失,然后再次闪烁很短的时间。

    正如我所提到的,这似乎与重叠主窗口的透明图像有关,但我发现这种行为非常烦人。有没有办法解决它,或者我做错了什么?

1 个答案:

答案 0 :(得分:1)

class Count: def __init__(self, start=0, step=1): self.c = start self.step = step def __iter__(self): return self def __next__(self): n = self.c self.c += self.step return n 设置为topMost可以解决此问题。

true