您好,如何刷新或清理图像缓存? [英] Hello, How to refresh or clean the image cache?

查看:84
本文介绍了您好,如何刷新或清理图像缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在服务器中更新图像时,如何刷新UWP应用程序的图像控制器中显示的图像,而不使用选项BitmapCreateOptions.IgnoreImageCache设置? 


解决它的唯一方法似乎是重新启动应用程序,这对用户来说不是一个好主意。

解决方案

< blockquote>


你好Dzhugashvili,



>>如何刷新UWP应用程序的图像控制器中显示的图像,而不使用选项BitmapCreateOptions.IgnoreImageCache设置它? 



你如何创建bitmapimage?通过Uri或其他方式?



如果您使用的是Uri,在服务器中更新图像源之后,您可以设置  UriSource = null 对于任何BitmapImage 您的Image
控件的源设置为。





最好的问候,



罗伊


When the image was updated in the server, how to refresh the image shown in the Image Controller of the UWP application without setting it with the option BitmapCreateOptions.IgnoreImageCache? 

The only way to solve it seems to be restarting the application, which is not a good idea for users.

解决方案

Hi Dzhugashvili,

>>how to refresh the image shown in the Image Controller of the UWP application without setting it with the option BitmapCreateOptions.IgnoreImageCache? 

How you create the bitmapimage? Via a Uri or other ways?

If you are using a Uri, after you have update your image source in your server, you could set UriSource = null for whatever BitmapImage your Image control's source was set to.

Best regards,

Roy


这篇关于您好,如何刷新或清理图像缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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