1.添加引用:System.Windows.Forms 2.代码如下: private void btnSelectFolder_Click(object sender, RoutedEventArgs e) { //FolderBrowserDialog System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog(); if (this.tbFolder.Text != string.Empty) { if (Directory.Exists(this.tbFolder.Text)) fbd.SelectedPath = this.tbFolder.Text; } fbd.ShowDialog(); if (fbd.SelectedPath != string.Empty) this.tbFolder.Text = fbd.SelectedPath; } 最后效果如下图: