title: User settings reads wrong double type value
body: <p>I am trying to make an application for editing user settings and run in to a strange problem. I am writing and reading using <a href="https://msdn.microsoft.com/en-us/library/bb397750(v=vs.110).aspx" rel="nofollow">user settings</a>, and it cant read one of the variables.</p>
  
  <pre><code>    public MainWindow()
      {
          InitializeComponent();
  
          input1.Value = Properties.Settings.Default.input1Setting;
          input2.Value = Properties.Settings.Default.input2Setting;
      }
  
  
      private void input1_ValueChanged(object sender, RoutedPropertyChangedEventArgs&lt;double&gt; e)
      {
          Properties.Settings.Default.input1Setting = Convert.ToDouble(input1.Value);
          Properties.Settings.Default.Save();
      }
  
      private void input2_ValueChanged(object sender, RoutedPropertyChangedEventArgs&lt;double&gt; e)
      {
          Properties.Settings.Default.input2Setting = Convert.ToInt16(input2.Value);
          Properties.Settings.Default.Save();
      }
  
      private void OnlyNumberValidation(object sender, TextCompositionEventArgs e)
      {
          Regex regex = new Regex("[^0-9]+");
          e.Handled = regex.IsMatch(e.Text);
      }
  </code></pre>
  
  <p>and xaml sliders</p>
  
  <pre><code>&lt;Slider ValueChanged="input1_ValueChanged" IsSnapToTickEnabled="True" TickFrequency="0.25" Minimum="1" Maximum="50" Name="input1" PreviewTextInput="OnlyNumberValidation"/&gt;
  &lt;Slider ValueChanged="input2_ValueChanged" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="2000" Minimum="0" Name="input2" PreviewTextInput="OnlyNumberValidation"/&gt;
  </code></pre>
  
  <p>In visual studio settings editor input1 set as double, input2 as int. Botch scopes are set to user.</p>
  
  <p>The problem is, only slider input2 gets right value. input1 is always set to one.</p>
  
  <p>I tried to add MessageBox.Show(Properties.Settings.Default.input1Setting.ToString())
  on startup, and it still showed 1, but value of input1 in app.config (The one in project/bin/debug/ folder,the one in local/company/project/1.0.0/ and in visual studio app.config is 4)</p>
  
  <p><strong>upd1</strong> Changing 4 to 4.0 did not help. Still changes to 1.</p>