public void UpdateItem(IGalleryDelegate delegato, GalleryItem item) { _delegate = delegato; _item = item; Tag = item; Panel.Background = null; Texture.Source = null; if (item == null) { return; } var data = item.GetFile(); var thumb = item.GetThumbnail(); Panel.Constraint = item.Constraint; Panel.InvalidateMeasure(); if (thumb != null && (item.IsVideo || (item.IsPhoto && !data.Local.IsDownloadingCompleted))) { UpdateThumbnail(item, thumb); } UpdateFile(item, data); }
public void UpdateItem(IGalleryDelegate delegato, GalleryContent item) { _delegate = delegato; _item = item; Tag = item; Panel.Background = null; Texture.Source = null; ScrollingHost.ChangeView(0, 0, 1, true); if (item == null) { return; } var file = item.GetFile(); var thumbnail = item.GetThumbnail(); Panel.Constraint = item.Constraint; Panel.InvalidateMeasure(); UpdateManager.Subscribe(this, delegato.ProtoService, file, ref _fileToken, UpdateFile); UpdateFile(item, file); if (thumbnail != null && (item.IsVideo || (item.IsPhoto && !file.Local.IsFileExisting()))) { UpdateThumbnail(item, thumbnail, true); } }