WPF 获得文件夹路径 FolderBrowserDialog

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

posted @ 2013-08-24 10:50  @妞儿  阅读(1068)  评论(0编辑  收藏  举报