【发布时间】:2011-10-24 08:48:22
【问题描述】:
我在屏幕上显示图像时遇到问题。
我在 VS2010 中新建了 WPF 项目,并在 MainWindow.xaml 中添加了以下代码。
<Window
...>
<Grid>
<Grid.Background>
<ImageBrush ImageSource="image.jpg">
</Grid.Background>
</Grid>
</Window>
但是显示 image.jpg 并没有我想象的那么快,而且它不会立即显示 image.jpg。
首先它会显示一段时间的空屏幕(我认为是在渲染期间),然后显示 image.jpg。
如何避免空屏。
请帮帮我。
谢谢。
【问题讨论】:
标签: wpf image xaml time rendering