My app currently uses the user settings system (via project properties) to store user specific data. I use these settings instead of writing to/from App.Config because I need the data to persist when ClickOnce updates their build.
Right now I am needing the user to be able to specify a list of strings to be stored in user settings. I already deal with settings in a C# PropertyGrid, and I have verified that if I set MyPropertyGrid.SelectedObject = new List<string>(), it gives me a proper editor to edit a list of strings.
Unfortunately, when I go to Project Preferences -> Settings and click Browse for the type, I cannot select List or find any good types to use for a string list. Does anyone have any suggestions for how to store a list of strings in the user settings?
You can add your own settings manually when the designer won’t let you choose the types. This can happen with some built-in types and with a lot of your own custom types. Here’s a link to a similar question on SO:
Why am I unable to select a custom Type for a setting from the same project/assembly as the settings file?
and here’s a link to an answer (it’s in VB.NET but the principles apply):
http://blog.coretech.dk/jgs/add-custom-data-type-structure-to-mysettings-in-vbnet-wpf/