private async void OpenFile_Click(object sender, RoutedEventArgs e) { FileOpenPicker openPicker = new FileOpenPicker(); // 表示モードはリスト形式 openPicker.ViewMode = PickerViewMode.List; // デフォルトフォルダ //openPicker.SuggestedStartLocation = PickerLocationId.ComputerFolder; // 拡張子 openPicker.FileTypeFilter.Add("*"); // ファイルオープンピッカーを起動する StorageFile file = await openPicker.PickSingleFileAsync(); if (file != null) { // ファイル処理 } }
0 件のコメント:
コメントを投稿