private async Task <Uri> HandleDownload(DownloadOperation download, bool alreadyStarted)
        {
            var bindableDownload = new BindableDownloadOperation(download);

            try {
                ActiveDownloads.Add(bindableDownload);
                var callback = new Progress <DownloadOperation>(OnDownloadStatusUpdate);
                IAsyncOperationWithProgress <DownloadOperation, DownloadOperation> op = null;
                if (alreadyStarted)
                {
                    var d = download.AttachAsync();
                    op = download.AttachAsync();
                }
                else
                {
                    op = download.StartAsync();
                }
                op.Progress = (a, p) => {
                    OnBindableStatusUpdate(bindableDownload);
                };
                // awaits completion of download
                DownloadOperation completedDownload = await op.AsTask(Cts.Token, callback);

                return(FileUtils.UriFor(completedDownload.ResultFile));
            } finally {
                // download complete
                ActiveDownloads.Remove(bindableDownload);
            }
        }
 private async void OnBindableStatusUpdate(BindableDownloadOperation download)
 {
     await download.UpdateProgress();
 }