private async void open_folder(object sender, RoutedEventArgs e) { var folderPicker = new FolderPicker { SuggestedStartLocation = PickerLocationId.Desktop }; folderPicker.FileTypeFilter.Add("*"); StorageFolder folder = await folderPicker.PickSingleFolderAsync(); if (folder != null) { Windows.Storage.AccessCache.StorageApplicationPermissions. FutureAccessList.AddOrReplace("PickedFolderToken", folder); folder_handler = new FolderData(folder); folder_handler.PopulateViewList(); listView.ItemsSource = folder_handler.ViewContentList; } }
public MainPage() { this.InitializeComponent(); folder_handler = new FolderData(); listView.ItemsSource = folder_handler.ViewContentList; }