internal virtual void OnBeforeVistaDialog(FileDialogNative.IFileDialog dialog) { dialog.SetDefaultExtension(this.DefaultExt); dialog.SetFileName(this.FileName); if (!string.IsNullOrEmpty(this.InitialDirectory)) { try { FileDialogNative.IShellItem initialDirectory = GetShellItemForPath(this.InitialDirectory); dialog.SetDefaultFolder(initialDirectory); dialog.SetFolder(initialDirectory); } catch (FileNotFoundException) { } } dialog.SetTitle(this.Title); dialog.SetOptions(GetOptions()); SetFileTypes(dialog); this._customPlaces.Apply(dialog); }