Search code examples
c#winformsopenfiledialog

OpenFileDialog: Select Multiple Files Using a Check Box


Is there an option to make check boxes appear beside files when multiselecting files using an openfiledialog?

I know that there is a Windows option to change this, but is there a way to temporarily change this for my specific openfiledialog?

Or alternatively is there a way to change the Windows setting? I was thinking I could check to see if its already set to show the check boxes, and if it is I do nothing, otherwise I change it and when the dialog closes I change it back.


Solution

  • You need to build your own OpenFileDialog to achieve this. Create a Class and inherit from FileDialog, because OpenFileDialog is a sealed Class and can not be inherited or extended.

    The OpenFileDialogEx Project could give you information to implement a nice Solution. Take a look.