我处境艰难。我想在哪里创建无限滚动图像列表。图像的尺寸为200 x 200。 我正在使用LongListselector图像应该从远程urls加载。所以在LongListselector中加载图像的最佳方法是什么。 下面是LongListSelector Item的xaml。
<Image Width="190" Height="130" Source="{Binding Image}" ImageFailed="Image_ImageFailed"/>
以下是viewmodel
public class RemoteImage{
public ImageSource Image
{
get
{
this._image = new BitmapImage(new Uri(ItemCommon._baseUri, this._imagePath)); return this._image;
}
set
{
this._image= value;
this.SetProperty(ref this._image, value);
}
}
}
但是上面的实现给了我Out of Memory Exception。 任何人都可以指导我如何在无限滚动LongListSelector中加载图像,而不会出现内存异常。
谢谢。