[英]How to display progress bar in windows phone 8 for images sourced from the web?
[英]How to display Images from internet in a windows phone 7 app?
我正在制作一个通过解析RSS feed来获取图像网址的应用程序。我想在屏幕上点击时逐个显示应用程序中的图像。我该怎么办? 在显示之前是否需要下载所有图像? 请解释。
谢谢并恭祝安康
航海
也许我不能正确理解您的问题,但是您应该能够将Image元素的Source直接设置为RSS feed项目中指定的URI。
<Image x:Name="m_Image" Source="http://www.microsoft.com/silverlight/images/ms-silverlight-logo.png"/>
更改项目时(通过点击),您可以轻松地从代码中交换图像源。
Uri uri = new Uri("...", UriKind.Absolute);
ImageSource imgSource = new BitmapImage(uri);
m_Image.Source = imgSource;
使用LowProfileImageLoader(如Thomas Joulin和Mick N提到的)是在后台加载图像并保持UI响应能力的好方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.