RestoreDirectory is set to two OpenFileDialog()s but they behave as if one OpenFileDialog(). I mean, when I use one of them and exit, then use other one, it shows the directory of the first one.
public partial class MainWindow : Window
{
Microsoft.Win32.OpenFileDialog ofd_1;
Microsoft.Win32.OpenFileDialog ofd_2;
}
public MainWindow()
{
ofd_1 = new Microsoft.Win32.OpenFileDialog();
ofd_2 = new Microsoft.Win32.OpenFileDialog();
}
private fnc_1 ()
{
ofd_1.RestoreDirectory = true;
}
private fnc_2 ()
{
ofd_2.RestoreDirectory = true;
}
RestoreDirectoryis not implemented onOpenFileDialog, so it doesn’t actually do anything. You can use theInitialDirectoryproperty to set the directory yourself though.