Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async void ButtonLoad_Click(object sender, RoutedEventArgs e)
- {
- /* he probado de todas las maneras posibles y no funciona con metodos page_loaded, LayoutRoot_Loaded eso es
- *
- StorageFolder folder = KnownFolders.DocumentsLibrary;
- IReadOnlyList<StorageFile> files = await folder.GetFilesAsync();
- foreach (StorageFile file in files)
- {
- // Do something with file
- string path = file.Path;
- }*/
- StorageFolder storageFolder = KnownFolders.DocumentsLibrary;
- IReadOnlyList<StorageFile> listFiles = await storageFolder.GetFilesAsync();
- int countFiles = listFiles.Count;
- int i = 0;
- int indice = 0;
- while (i < countFiles)
- {
- StorageFile file = listFiles.ElementAt(indice);
- string path = file.Path;
- ListBoxFiles.Items.Add(path);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement