【问题标题】:Rendering Time of Image Defined in XamlXaml 中定义的图像的渲染时间
【发布时间】: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


    【解决方案1】:

    我认为ImageSource.DownloadCompleted 事件、PriorityBindingBinding.IsAsync 会在这里为您提供帮助...

    http://social.msdn.microsoft.com/Forums/en-AU/wpf/thread/b3dc9baa-4cf6-49ed-a316-b9fb1cd29516

    【讨论】:

      猜你喜欢
      • 2015-09-25
      • 1970-01-01
      • 2014-08-29
      • 1970-01-01
      • 1970-01-01
      • 2019-11-12
      • 1970-01-01
      • 2012-09-03
      • 1970-01-01
      相关资源
      最近更新 更多