private async void pickerSelectionChanged(PickerFileMessage obj) { if (obj.Selected) { Uri uri = new Uri(obj.TargetUrl); string filename = Path.GetFileName(uri.LocalPath); var file = await ApplicationData.Current.TemporaryFolder.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); var downloader = new BackgroundDownloader(); var download = downloader.CreateDownload( uri, file); var res = await download.StartAsync(); _fileOpenPickerUI.AddFile(obj.TargetUrl, file); } else if (_fileOpenPickerUI.ContainsFile(obj.TargetUrl)) { _fileOpenPickerUI.RemoveFile(obj.TargetUrl); } }