locked
Microsoft.Win32.SaveFileDialog Set System.Environment.CurrentDirectory RRS feed

  • Question

  • Hi,

    I need a SaveFileDialog and OpenFileDialog in my WPF application and according to what I've found on the web the way to do it is using Microsoft.Win32.SaveFileDialog.

    The problem is that the SaveFileDialog change the CurrentDirectory to the directory of the selected file and it cause the whole application now direct its files there.

    Can someone help on how to make it stop it?

     

    Thank you,

    Ido.

    Wednesday, February 23, 2011 12:39 PM

Answers

  • Yea but why do you than not save the currentdirectory in advance and set it back after the open file dialog. 

    Seems to me not that difficult.

    ?


    Success
    Cor
    • Proposed as answer by Yves.Z Tuesday, March 1, 2011 6:44 PM
    • Marked as answer by Yves.Z Monday, March 7, 2011 10:01 AM
    Wednesday, February 23, 2011 12:55 PM

All replies

  • Yea but why do you than not save the currentdirectory in advance and set it back after the open file dialog. 

    Seems to me not that difficult.

    ?


    Success
    Cor
    • Proposed as answer by Yves.Z Tuesday, March 1, 2011 6:44 PM
    • Marked as answer by Yves.Z Monday, March 7, 2011 10:01 AM
    Wednesday, February 23, 2011 12:55 PM
  • Hi,

    This is a possible workaround, which I use, but I expect the documentation to say something about it and have a flag to turn this behavior on and off.

     

    Thank you,

    Ido.

    Tuesday, March 1, 2011 8:16 PM