我该如何进行控制(可能是一种FolderBrowser) [英] How can I make this control (may a kind of FolderBrowser)
问题描述
如下图所示,它看起来像文件对话框和文件夹浏览器.该对话框只能选择文件夹(不能选择文件).这是自定义控件吗?如果是这样,那么请给我一些建议.这是一个Winforms应用程序.
它是OpenFileDialog的基于Vista IFileDialog的本机版本.启用FOS_PICKFOLDERS.该选项未在.NET中公开,在Windows的早期版本中不可用.您可以从 Windows API代码包的CommonOpenFileDialog.IsFolderPicker属性获取包装器. >
As you can see in the picture below, this looks like a file dialog and folder browser. This dialog can select only folder(not file). Is this a custom control? If so, then please give me advice on how to make it. This is a Winforms application.
It is the native Vista IFileDialog based version of OpenFileDialog. With the FOS_PICKFOLDERS turned on. That option is not exposed in .NET, it isn't available on earlier versions of Windows. You can get a wrapper for it from the Windows API Code Pack, CommonOpenFileDialog.IsFolderPicker property.
这篇关于我该如何进行控制(可能是一种FolderBrowser)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!