Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Ookii.Dialogs.Wpf/VistaFileDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ internal virtual void SetDialogProperties(Ookii.Dialogs.Wpf.Interop.IFileDialog
if( !string.IsNullOrEmpty(_initialDirectory) )
{
Ookii.Dialogs.Wpf.Interop.IShellItem item = NativeMethods.CreateItemFromParsingName(_initialDirectory);
dialog.SetDefaultFolder(item);

// The dialog.SetDefaultFolder(item) is only set first time the applications sets the folder,
// Next time the folder will be restored to last picked object and the 'Default folder' is ignored
// Use instead dialog.SetFolder which behaviour better matches the name 'InitialFolder'
dialog.SetFolder(item);
}

if( !string.IsNullOrEmpty(_title) )
Expand Down