问题
Is there an alternative for selecting folders in C#?
Optimally I'd like to use the OpenFileDialog to select folders, or at least something similar to that.
回答1:
Here you have and OpenFileOrFolder dialog and here another FolderBrowserDialog both Open Source.
回答2:
Ookii Dialogs libraries have an implementation of a folder browser dialog for Windows Forms and WPF
Ookii.Dialogs.WinForms
https://github.com/caioproiete/ookii-dialogs-winforms
Ookii.Dialogs.Wpf
https://github.com/caioproiete/ookii-dialogs-wpf
回答3:
The closest I found myself to what you may want is this:
http://www.codeproject.com/Articles/15059/C-File-Browser
This is a control that you can place on a dialog (form). It allows selecting files or folders. Here is what my implementation looks like:
回答4:
Try out BetterFolderBrowser. It does exactly what you prefer by providing you with an easy-to-use folder-browsing experience that mimics the OpenFileDialog
dialog window, and, since it works as a component, you'll be able to easily tweak it properties in Design Mode. It's pretty neat and very handy. Do check it out.
来源:https://stackoverflow.com/questions/12461016/alternative-to-folderbrowserdialog