For an application I am writing, users have to select a folder containing some logfiles that the app works with. To make it more intuitive, I want them to be able to see the files in the folder, but still only be able to select the folder of course.
So my problem is, how can I have the Dialog open folders only, but still show the other files.
I have tried the solution from this thread,
How can I make CommonOpenFileDialog select folders only, but still show files?
However, it doesn't seem to work on Windows10, at least not for me and the other PCs I've tried it on.
This is what I currently have to open:
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
dialog.IsFolderPicker = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
{ }