如何才能创建具有的OpenFileDialog在C#相同的功能(有一些扩展功能一起)的用户控件?我已经按照这,但我无法找到一个为解决我的问题。
How can one create a user control that has the same functionality (along with some extended features) of OpenFileDialog in C#? I've followed this, but I could not find a solution for my problem.
我的要求是在对话框中添加额外的按钮。如果该按钮被点击然后家长应以同样的方式为通知确定和取消按钮的功能。
My requirement is to add an extra button in the dialog. If that button gets clicked then the parent should be notified in the same manner as the ok and cancel buttons do.
推荐答案的 打开文件对话框 是一个密封类,因此不能被继承或延长。最好的办法是写自己的打开文件对话框。
The OpenFileDialog is a sealed class, and as such can't be inherited or extended. Your best bet would be to write your own open file dialog.
在另一方面,该的 的FileDialog 类是不密封,所以你可以继承这并进行必要的自定义设置。请参见 www.codeproject/KB/dialog/OpenFileDialogEx.aspx了解更多信息。
On the other hand, the FileDialog class isn't sealed, so you could inherit from that and make the necessary customizations. See www.codeproject/KB/dialog/OpenFileDialogEx.aspx for more information
更多推荐
如何在C#中自定义打开文件对话框
发布评论