WPF 获得文件夹路径可用FolderBrowserDialog类,
添加System.Windows.Forms引用,
并引用命名空间using System.Windows.Forms;
privatevoid button1_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog fbd =new FolderBrowserDialog(); fbd.ShowDialog(); textBox1.Text = fbd.SelectedPath; }
本文来自work hard work smart的博客,原文地址:http://www.cnblogs.com/linlf03/archive/2011/07/26/2117698.html