質問

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.

役に立ちましたか?

解決

Here you have and OpenFileOrFolder dialog and here another FolderBrowserDialog both Open Source.

他のヒント

For this very reason I developed BetterFolderBrowser. It's a .NET library does just what you need by providing an easy-to-use folder browsing experience that mimics the OpenFileDialog dialog window. Also, since it works as a component, you'll be able to easily tweak its properties in Design Mode. Hope it helps.

Ookii Dialogs libraries have an implementation of a folder browser dialog for Windows Forms and WPF

Ookii Folder Browser Dialog

Ookii.Dialogs.WinForms

https://github.com/augustoproiete/ookii-dialogs-winforms


Ookii.Dialogs.Wpf

https://github.com/augustoproiete/ookii-dialogs-wpf

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:

enter image description here

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top