Ejemplo n.º 1
0
 public AttachedImageViewModel(AttachedImage attachedAlbumModel, ImageSource image)
 {
     _attachedAlbumModel = attachedAlbumModel;
     _linkUrl = attachedAlbumModel.LinkUrl;
     _image = image;
     _width = image.Width;
     _height = image.Height;
 }
Ejemplo n.º 2
0
 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;
 }