In a WPF application, when a user clicks on a button I want to open the Windows explorer to a certain directory, how do I do that?
I would expect something like this
This should work:
Process.Start(@"")
Or if you'd like a method to run programs/open files and/or folders:
private void StartProcess(string path)
{
ProcessStartInfo StartInformation = new ProcessStartInfo();
StartInformation.FileName = path;
Process process = Process.Start(StartInformation);
process.EnableRaisingEvents = true;
}
And then call the method and in the parenthesis put either the directory of the file and/or folder there or the name of the application. Hope this helped!