J
Jon Slaughter
I wrote an app that needed to save settings such as colors, fonts, etc...
after hours of trying to use ConfigurationManager and AppSettings along with
a few other things I finally found that I could just use
global:roperties.xxx.Settings.Default.yyy
where xxx is the namespace and yyy is a setting created in the settings
dialog.
This is an extremly easy way to save and restore properties but I'm
wondering how general it is and if its a good idea to use it?
Also, where are these settings stored? It seems that its somewhere in the
CLR(maybe not the appropriate term) cache or something? The only way I
could reset the settings is by setting them to some default values and then
saving them.
One issue I was having was when I was using AppSettings[key]. I could never
find any settings even though I had both application and user defined
settings created in app.config. Are these settings suppose to be the same
as the ones above or are they different? (such as a different section/group
name in the xml config file?)
e.g., if I created a user or application defined setting called
"SomeSetting" in the settings page and then tried to reference it by
AppSettings["SomeSetting"], I would also get a null string.
Thanks,
Jon
after hours of trying to use ConfigurationManager and AppSettings along with
a few other things I finally found that I could just use
global:roperties.xxx.Settings.Default.yyy
where xxx is the namespace and yyy is a setting created in the settings
dialog.
This is an extremly easy way to save and restore properties but I'm
wondering how general it is and if its a good idea to use it?
Also, where are these settings stored? It seems that its somewhere in the
CLR(maybe not the appropriate term) cache or something? The only way I
could reset the settings is by setting them to some default values and then
saving them.
One issue I was having was when I was using AppSettings[key]. I could never
find any settings even though I had both application and user defined
settings created in app.config. Are these settings suppose to be the same
as the ones above or are they different? (such as a different section/group
name in the xml config file?)
e.g., if I created a user or application defined setting called
"SomeSetting" in the settings page and then tried to reference it by
AppSettings["SomeSetting"], I would also get a null string.
Thanks,
Jon