wpf 文件选择框 文件夹选择框

 Microsoft.Win32.OpenFileDialog fd = new Microsoft.Win32.OpenFileDialog();
                    fd.Multiselect = true;
                    fd.Title = "选择输出目录";
                    if (fd.ShowDialog() == true)
                    {
                       
                    }



nuget引用 Microsoft.WindowsAPICodePack-Shell
文件夹选择:
var dialog = new CommonOpenFileDialog();
                    dialog.IsFolderPicker = true;
                    CommonFileDialogResult result = dialog.ShowDialog();

 

posted @ 2020-12-19 20:30  IWing  阅读(372)  评论(0)    收藏  举报