Preselected latest file in OpenFileDialog class C# for WPF

I already read and checked the Microsoft documentation concerning the “OpenFileDialog” for WPF in C# and also already browsed here on stackoverflow, but I could not find what I was looking for

I want to know how to use the OpenFileDialog class so that the latest file (concerning datetime as the file was created) is already selected in the dialog and so that the user only needs to click open. So, the latest file is selected as though it had been clicked once.

If the user wants to open an older file (older than the latest file) the user can select another file manually. So, the whole still has to look like the conventional OpenFileDialog.

Thanks in advance and best regards.



Read more here: https://stackoverflow.com/questions/68474096/preselected-latest-file-in-openfiledialog-class-c-sharp-for-wpf

Content Attribution

This content was originally published by s950mpc2000 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: