private void UpdateFile(ViewModels.Drawers.StickerViewModel sticker, File file, ref Image thumbnail, ref ImageView texture, ref Border container) { if (file.Local.IsDownloadingCompleted) { if (sticker.IsAnimated) { thumbnail.Opacity = 0; texture.Source = null; container.Child = new LottieView { Source = new Uri("file:///" + file.Local.Path) }; } else { thumbnail.Opacity = 0; texture.Source = PlaceholderHelper.GetWebPFrame(file.Local.Path); container.Child = new Border(); } } else if (file.Local.CanBeDownloaded && !file.Local.IsDownloadingActive) { thumbnail.Opacity = 1; texture.Source = null; container.Child = new Border(); sticker.ProtoService.DownloadFile(file.Id, 32); } }
public MenuFlyoutMediaItem(ViewModels.Drawers.StickerViewModel sticker) : base() { DefaultStyleKey = typeof(MenuFlyoutMediaItem); _media = sticker; }