FolderBrowserDialog in wpf c#

kartal picture kartal · Jul 8, 2011 · Viewed 22.1k times · Source

I am using System.Windows; and System.Windows.Controls; so I can't use System.Windows.Forms; because there is a lot of controls like messagebox and list box...etc are common between them is there another solution to get folderbrowserdialog without using System.Windows.Forms; or is there any get folder location dialog box ?

Answer

Aaron McIver picture Aaron McIver · Jul 8, 2011

You can use the FolderBrowserDialog; either explicitly place the namespace in front of the class...

System.Windows.Forms.FolderBrowserDialog browse = new System.Windows.Forms.FolderBrowserDialog();

...or create an alias with regard to your namespace.

Imports [ aliasname = ] namespace