2

我正在设置ImageUrla StyledStringElement,但不知道 url 是否存在。我想放入一个placeholder image在成功下载图像之前使用的:

    var item = new StyledStringElement(n.Title);
        item.ImageUri = new Uri(n.ImageThumbUrl);

我现在明白了:

在此处输入图像描述

4

1 回答 1

2

有帮助:http: //yusinto.blogspot.ca/2012/05/background-image-downloading-with.html

我将其复制StyledStringElement到一个新的StyledStringElementLoader并编辑了此代码:

    if (extraInfo.Uri != null)
    {   img = ImageLoader.DefaultRequestImage (extraInfo.Uri, this);
        if(img==null)
            img=myLoaderImagePassedToConstructor;
    }
于 2012-09-07T01:15:30.807 回答