I have a C# application where I store certain value in a Settings file like this:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="VITRIconEvacuationPlan.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="VITRIconEvacuationPlan.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<EvacuationPlan.Properties.Settings>
<setting name="AssemblyCentre" serializeAs="String">
<value>False</value>
</setting>
</EvacuationPlan.Properties.Settings>
</applicationSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup><userSettings>
<EvacuationPlan.Properties.Settings>
<setting name="SymbolScale" serializeAs="String">
<value>25</value>
</setting>
</EvacuationPlan.Properties.Settings>
</userSettings>
</configuration>
Per default, the SymbolScale property is set to 25 (when I start the application the first time) I want to change the SymbolScale property at runtime so I put this into User Scope. So I can say:
setting.SymbolScale = 150;
setting.save();
But when I close my application the value of the SymbolScale is 25 again. But I want it to store my chenged value from the runtime. What am I doing wrong?