Using FolderBrowserDialog in WPF application

david picture david · Dec 28, 2010 · Viewed 170.8k times · Source

I have a WPF application that I need to have users access directories in. I have searched to the end of the world on how to integrate windows forms into WPF and have found all kinds of information on how to integrate form controls into my xaml, however, integrating a FolderBrowserDialog...

I am veteran programmer, but very new to .net (2nd day in fact), and I believe I can not find good information on immplementing this simply because I can not determine what the name/type is for a FolderBrowserDialog.

Please help. thanks, -David

Oh, and I am using c# and Visual Studio 2008

Answer

SLaks picture SLaks · Dec 28, 2010

You need to add a reference to System.Windows.Forms.dll, then use the System.Windows.Forms.FolderBrowserDialog class.

Adding using WinForms = System.Windows.Forms; will be helpful.