我正在设置 StyledStringElement
的 ImageUrl
,但不知道该 url 是否存在。我想放入一个占位符图像
,在成功下载图像之前使用该图像:
var item = new StyledStringElement(n.Title);
item.ImageUri = new Uri(n.ImageThumbUrl);
我现在明白了:
最佳答案
有用: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;
}
关于ios - MonoTouch.Dialog:当没有 ImageUrl 时,StyledStringElement 上的默认图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12310006/