@inject DownloadService DownloadService

In Progress

@foreach (var queueItem in DownloadService.Queue.Where(qi => qi.State)) {

@queueItem.Title | @queueItem

@queueItem.BytesDownloaded / @queueItem.TotalBytes
}

Up Next

@foreach (var queueItem in DownloadService.Queue.Where(qi => qi.Status == Enums.DownloadStatus.Idle)) {

@queueItem.Title | @queueItem

@queueItem.BytesDownloaded / @queueItem.TotalBytes
}

Completed

@foreach (var queueItem in DownloadService.Queue.Where(qi => !qi.State)) {

@queueItem.Title | @queueItem

@queueItem.BytesDownloaded / @queueItem.TotalBytes
}
@code { [Parameter] public bool Visible { get; set; } [Parameter] public EventCallback VisibleChanged { get; set; } protected override async Task OnInitializedAsync() { DownloadService.OnQueueChanged += async () => { StateHasChanged(); }; } }