コード例 #1
0
 public async Task ShowAsync()
 {
     this.Visibility             = Visibility.Visible;
     CurrentlyAccessedFolder     = ImageNavigationHelper.ContainingFolder;
     CurrentlyDisplayedImageItem = ImageNavigationHelper.SelectedImage;
     ImageData = CurrentlyAccessedFolder.GetRawImageItems();
     CurrentIndexInImageData = ImageData.IndexOf(CurrentlyDisplayedImageItem);
     UpdateArrowsVisibility();
     await CurrentlyDisplayedImageItem.ToImageAsync();
 }
コード例 #2
0
        private async Task UpdateImageToIndex(int index, CancellationToken ct = new CancellationToken())
        {
            if (ct.IsCancellationRequested)
            {
                return;
            }
            var oldImage = CurrentlyDisplayedImageItem;

            CurrentlyDisplayedImageItem = ImageData[CurrentIndexInImageData];
            if (ct.IsCancellationRequested)
            {
                return;
            }
            await CurrentlyDisplayedImageItem?.ToImageAsync(ct);

            await oldImage?.ToThumbnailAsync();
        }