0

I am currently On my MVVM side. I've developed the "OpenFileDialog" side. Now I am trying to do the opposite. Which is "FolderBrowserDialog" side. But Just trying to Initiate it doesn't work.

FolderBrowserDialog folder = new FolderBrowserDialog()

"Cannot resolve FolderBrowserDialog symbol in other words.

May I ask if there's a certain library I have to bring in to fix this?

Master
  • 2,038
  • 2
  • 27
  • 77
  • Are you using WPF, then? `FolderBrowserDialog` is in `System.Windows.Forms`. See https://stackoverflow.com/a/1922230/707111, though. – Ry- Mar 03 '14 at 20:13
  • See [MSDN](http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx): it's in `System.Windows.Forms`, so you need a reference to that assembly, and you need to add `using System.Windows.Forms;` to the top of your code. – Blorgbeard Mar 03 '14 at 20:14
  • No library called System.Windows.Forms :s – Master Mar 03 '14 at 20:16

1 Answers1

1

Add System.Windows.Forms.FolderBrowserDialog class

Using FolderBrowserDialog in WPF application

Community
  • 1
  • 1
Milen
  • 8,697
  • 7
  • 43
  • 57