1

I want to show Open Directory dialog, but I'd like to customize it so that folders which have .project folder inside of them are marked with a different folder icon and only those folders can be chosen.

Now I wonder if there's already a user control or a sensible way to accomplish without building your own tree view with files and write all that navigation logic on your own. :)

Tower
  • 98,741
  • 129
  • 357
  • 507
  • possible duplicate of [How to create customized open file dialog in C#](http://stackoverflow.com/questions/7831432/how-to-create-customized-open-file-dialog-in-c-sharp) – Alain May 22 '12 at 17:54

1 Answers1

2

Regardless of your development language, the (non-.Net) OpenfileDialog is a built-in Windows feature and non-trivial to customize. At best, I've seen examples that hook the window and wrap it in some additional custom controls (here).

Looking at the .Net 4 OpenfileDialog class, it's sealed and cannot be extended.

Your best bet for accomplishing this is to build a custom dialogue, possibly by extending the same base class used by .Net 4 OpenfileDialog, FileDialog.

Alain
  • 26,663
  • 20
  • 114
  • 184