public AttachedImageViewModel(AttachedImage attachedAlbumModel, ImageSource image) { _attachedAlbumModel = attachedAlbumModel; _linkUrl = attachedAlbumModel.LinkUrl; _image = image; _width = image.Width; _height = image.Height; }
public static async Task<AttachedImageViewModel> Create(AttachedImage attachedAlbumModel, string option = "w640-h500") { var img = await DataCacheDictionary.DownloadImage( new Uri(attachedAlbumModel.Image.ImageUrl.Replace("$SIZE_SEGMENT", option))).ConfigureAwait(false); return img != null ? new AttachedImageViewModel(attachedAlbumModel, img) : null; }