第一次加载BitmapImage时闪烁 [英] Flicker when loading BitmapImage for first time

查看:81
本文介绍了第一次加载BitmapImage时闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次使用BitmapImage时,我得到一个非常烦人的闪烁。在那之后,一切都很顺利,我在我的应用程序的2个区域中有这个。

I'm getting a really annoying flicker when a BitmapImage is being used for the first time. After that, everything is smooth, I have this in 2 areas of my app.

在一个实例中,我在XAML中声明了图像,这是一个带图像的堆栈面板:

< Image 高度 =" 146" 来源 =" ../ Assets / home_button_stati c.png" 拉伸 =" Fill" />

In one instance, I have the images declared in XAML, a stack panel with images:
<ImageHeight="146"Source="../Assets/home_button_static.png"Stretch="Fill"/>

 

在另一个例子中,我正在加载这样的位图:

In another instance, I am loading the bitmap like this:

profile_button_active = new BitmapImage(new Uri("ms-appx:/Assets/profile_button_active.png"));

并更改图像的Source属性当用户点击该部分时的堆栈面板。

我第一次显示这些图形时只会闪烁,无论如何我可以预加载它在启动屏幕上还是可以避免这种烦人的闪烁?

I am only getting flicker when it displays these graphics the first time, is there anyway I can preload it at the splash screen or something to avoid this annoying flicker?



 


 

推荐答案

可耻的碰撞,还有另外一个有同样问题的人!
Shameful bump, there's gotta be another person with the same problem!


这篇关于第一次加载BitmapImage时闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆