private async void buttonRemove_Click(object sender, RoutedEventArgs e) { BulletinFile bf = (BulletinFile)listView1.SelectedItem; if (bf != null) { StorageFile sf = await StorageFile.GetFileFromApplicationUriAsync(new Uri(bf.FileNameOnly)); await sf.DeleteAsync(); listView1.ItemsSource = null; listView1.ItemsSource = BulletinFileManager.GetBulletinFilesFromStorePath(); } }
private async void listView1_SelectionChangedAsync(object sender, SelectionChangedEventArgs e) { BulletinFile bf = (BulletinFile)listView1.SelectedItem; if (bf != null) { storageFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(bf.FileNameOnly)); pdfDoc = await PdfDocument.LoadFromFileAsync(storageFile); LoadPdf(pdfDoc, 2); //StorageFile sf = await StorageFile.GetFileFromApplicationUriAsync(new Uri(bf.FileNameOnly)); //var stream = await sf.OpenAsync(FileAccessMode.Read); //RichEditBoxBulletinContent.Document.LoadFromStream(TextSetOptions.FormatRtf, stream); } }