How do I save user configuration settings into a database instead of a file? RRS feed

  • Question

  • We're working on writing a new WPF application. One of the requirements is to save things like the position of a window, the order of columns in a data grid view and so on, so that when the user gets back into the app it will return exactly the way they were last in it.

    To that end I found an article on CodeProfile titled User Settings Applied. This loked very promising. In fact it does everything we need, but with on major exception; it saves all of the user settings into a local file.

    In going through the code from the User Settings Applied website that took me eventually to the LocalFileSettingsProvider, which is used by the code in the CodeProject article. According to the MSDN documentation LocalFileSettingsProvider saves the user's settings into a file named user.config under their profile in Windows. Sure enough I found it there.

    But in this case that won't work. One of the requirements of this application is that the user settings be saved in a database, not the user's profile. So is there a way for me to insert some other code to use a database instead of saving it to the user.config file?

    Or is there an entirely different way of doing what I'm trying to do?


    Monday, October 5, 2015 8:56 PM