Saving images locally in windows phone 8.1 universal app

余生长醉 提交于 2019-12-03 22:45:11

There's a great extension by Q42 in their Q42.WinRT framework called ImageExtensions.cs

You use it on normal Image objects in XAML, but instead of setting the Source of the Image, you set the ImageExtensions.CacheUri.

<Image q42controls:ImageExtensions.CacheUri="https://www.google.com/favicon.ico" />

q42controls is just a namespace added on top of the XAML page

xmlns:q42controls="using:Q42.WinRT.Controls"

When the image is loaded, it's automatically cached!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!