Is there a folder browser dialog box built in to WPF? If so, can someone point me in the right direction. If not (and I am guessing this is the case given my searching) can I reference System.Windows.Forms and use the dialog box from there? Would that have negative consequences?

1 answers
There isn't a WPF-specific FolderBrowserDialog but the Windows Forms version should work fine. Just add a reference to System.Windows.Forms.dll and then create it in the usual way.
As a general rule, it's best not to put 'using System.Windows.Forms;' at the top of the file as this can lead to ambiguity errors when WPF has similarly named controls etc.
So, just fully qualify everything:
answered one year ago by:
17279
499
As usual... exactly what I needed. Slightly off topic but is there a way to get a combination of: Environment.SpecialFolder.MyComputer and Environment.SpecialFolder.Desktop. MyComputer provides exactly the view I need except that I'd like Desktop at the top.
17279
You might be able to create a combined folder by juggling with the registry keys (see for example http://www.pctools.com/guides/registry/detail/73/) but this sort of stuff makes me nervous ;)