FolderDialog problem in WPF

Posted by Agopi.net under C# on 11/6/2011 | Points: 10 | Views : 1100 | Status : [Member] | Replies : 1
How can i use the folderdialog control in WPF. As there is no control for this. Could anybody give me an idea that how can we use?




Responses

Posted by: Blessyjees on: 11/6/2011 [Member] Bronze | Points: 25

Up
0
Down
For getting this, add reference of the System.windows.Forms in the project and add the code below
using form=System.Windows.Forms;


using (form.FolderBrowserDialog dlg = new form.FolderBrowserDialog())
{
form.DialogResult result = dlg.ShowDialog();
if (result == form.DialogResult.OK)
{
this.txtPath.Text = dlg.SelectedPath;

}
}


Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Agopi.net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response