I followed Joe's idea on how to use CommonOpenFileDialog to open a folder / file here
I've installed the package Microsoft.WindowsAPICodePack-Shell
in my project and included this line as well: using Microsoft.WindowsAPICodePack.Dialogs;
The code:
private void Button_Click(object sender, RoutedEventArgs e)
{
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.InitialDirectory = "C:\\Users";
dialog.IsFolderPicker = true;
dialog.Multiselect = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
{
MessageBox.Show("You selected: " + dialog.FileName);
}
}
However, there are some methods / attributes that I could not use. I screenshotted the errors I got: errors
Is there an updated documentation on how to use the CommonOpenFileDialog package so that I can refer to it?