I have a ListView
that contains all images of the .jpg format from a given directory. It's filled by the codebehind using the following code:
DirectoryInfo folder = new DirectoryInfo(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + App.putanjaSlika);
FileInfo[] images = folder.GetFiles("*.jpg");
for (int i = 0; i<images.Length; ++i)
{
FileInfo img = images[i];
Thumbnails.Items.Add(new BitmapImage(new Uri(img.FullName)));
}
This works marvelously, but as you can see, the path is pretty much set in stone. What I need is some sort of a BrowseDirectoryDialog
that can allow me to "open" a given directory, and use the located path as the argument for the first line of the above code.
I've found this question Open directory dialog and I like the Ookii.Dialogs solution, but perhaps even more the solution under the second answer. However, seeing as how that thread is 3.5 years old, I wanted to ask if a better solution came out, since I wasn't able to find any.