I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors with a button for reverting to default color settings. By default value I mean what I set in Settings.settings at design time. Is there a way to read the default settings from Properties.Settings? I was hoping there would be something like:
Color defCellColor = Properties.Settings.Default.CellBackgroundColor.DefaultValue;
or even:
Color defCellColor = (Color)Properties.Settings.Default.GetDefaultValue("CellBackgroundColor");
For example:
- I have a user setting named "CellBackgroundColor" in Properties.Settings.
- At design time I set the value of CellBackgroundColor to Color.White using the IDE.
- User sets CellBackgroundColor to Color.Black in my program.
- I save the settings with Properties.Settings.Default.Save();
- User clicks on the "Restore Default Colors" button.
Now, Properties.Settings.Default.CellBackgroundColor returns Color.Black. How do I go back to Color.White?