How to create customized open file dialog in C#

前端 未结 3 1998
深忆病人
深忆病人 2020-12-18 09:06

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 s

3条回答
  •  [愿得一人]
    2020-12-18 09:37

    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.

    On the other hand, the FileDialog class isn't sealed, so you could inherit from that and make the necessary customizations. See http://www.codeproject.com/KB/dialog/OpenFileDialogEx.aspx for more information

提交回复
热议问题