public ThumbsItem(double width, Thickness margin, NewsPhotosInfo newsPhotosInfo) : base(width, margin, new Thickness()) { this._newsPhotosInfo = newsPhotosInfo; this.DesiredHeight = 320.0; this.PrepareThumbsList(); }
private void ReadThumbsListFromNewsPhotosInfo() { NewsPhotosInfo newsPhotosInfo = this._newsPhotosInfo; if ((newsPhotosInfo != null ? newsPhotosInfo.Photos : (List <Photo>)null) == null) { return; } this._thumbs.Clear(); foreach (Photo photo in this._newsPhotosInfo.Photos) { this._thumbs.Add(ThumbsItem.ConvertPhotoToThumb(photo, (Attachment)null)); } }
private void ReadThumbsListFromNewsPhotosInfo() { NewsPhotosInfo newsPhotosInfo = this._newsPhotosInfo; if ((newsPhotosInfo != null ? newsPhotosInfo.Photos : null) == null) { return; } this._thumbs.Clear(); List <Photo> .Enumerator enumerator = this._newsPhotosInfo.Photos.GetEnumerator(); try { while (enumerator.MoveNext()) { this._thumbs.Add(ThumbsItem.ConvertPhotoToThumb(enumerator.Current, null)); } } finally { enumerator.Dispose(); } }