Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed InitialFolder so it now works more than first time its called p… #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

buildcomplete
Copy link

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'

…r. application

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'
@buildcomplete
Copy link
Author

Regarding the behaviour:

In our Application the user specifies many different filetypes, so dependant on the category we restore the default directory or last used for the category in either filepickers or folderpicker... therefore we need this functionality.

we have code like this many places in our application

var path = WpfShellDialogs.UserOpenFile(
    "*.xml",
    "Prediction model (.xml)|*.xml",
    FolderProvider.GetLastOrDefaultFolder(FolderProvider.FolderName.PredictionModel));

Maybe a better fix would be something like

  • InitialDirectory = DefaultDirectory (I would rename but to keep the interface maybe not renaming the Method is better) => InitialDirectory = behaviour from before patch
  • add a SelectedDirectory for filepickers so it is possible to owerwrite the behaviour and thus have more control ourself

@augustoproiete augustoproiete self-assigned this Apr 15, 2019
@augustoproiete augustoproiete changed the base branch from master to develop October 29, 2020 04:19
@augustoproiete augustoproiete self-requested a review as a code owner October 29, 2020 04:19
@augustoproiete augustoproiete changed the base branch from develop to master November 15, 2020 03:05
@augustoproiete augustoproiete force-pushed the master branch 4 times, most recently from f6f2131 to de84c47 Compare December 28, 2020 00:17
@CLAassistant
Copy link

CLAassistant commented Jun 17, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants