public async Task UploadFile(string filePath) { var fileUpload = new FileUpload() { FilePath = filePath }; FileUploads.Add(fileUpload); await _fileTransferService.UploadFile(fileUpload, _viewer); }
public async Task UploadFile(string filePath) { var fileUpload = new FileUpload() { FilePath = filePath }; App.Current.Dispatcher.Invoke(() => { FileUploads.Add(fileUpload); }); await _fileTransferService.UploadFile(fileUpload, _viewer, (double progress) => { App.Current.Dispatcher.Invoke(() => fileUpload.PercentProgress = progress); }); }