public override async Task OnNavigatedToAsync(INavigationParameters parameters) { _IsThumbnailDeleteButtonActive.Value = true; var folder = await ThumbnailManager.GetTempFolderAsync(); var files = await folder.GetFilesAsync(); ulong size = 0; foreach (var file in files) { var prop = await file.GetBasicPropertiesAsync(); size += prop.Size; } _ThumbnailImagesCacheSizeText.Value = ToUserFiendlyFileSizeText(size) + "B"; // base.OnNavigatedToAsync(parameters); }
private async Task DeleteThumnnailsAsync() { _ThumbnailImagesCacheSizeText.Value = string.Empty; _IsThumbnailDeleteButtonActive.Value = false; await _thumbnailManager.DeleteAllThumnnailsAsync(); var folder = await ThumbnailManager.GetTempFolderAsync(); var files = await folder.GetFilesAsync(); ulong size = 0; foreach (var file in files) { var prop = await file.GetBasicPropertiesAsync(); size += prop.Size; } _ThumbnailImagesCacheSizeText.Value = ToUserFiendlyFileSizeText(size) + "B"; }