I\'m writing a WPF application with C# as the code behind and I want to give the users the option to change certain settings in my application. Is there a standard for storing
use ConfigurationSection
class to store / retrieve settings from configuration file
see: How to: Create Custom Configuration Sections Using ConfigurationSection
public class ColorElement : ConfigurationElement
{
[ConfigurationProperty("background", DefaultValue = "FFFFFF", IsRequired = true)]
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public String Background
{
get
{
return (String)this["background"];
}
set
{
this["background"] = value;
}
}
}