title: Combobox value does not stay as previous value when not re-set WPF
body: <p>I have read related issues, but my problem still occurs.
  I am trying to choose a database connection from the combobox and if it fails to connect, switch the combo value back to the previous one.
  Code:</p>
  
  <pre><code> public string SelectedConnStringValue
      { 
          get { return _selectedConnStringValue; }
          set
          {
              if (!DBConn.Instance.Open(value))
              {
                  System.Windows.MessageBox.Show("Attempt failed", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
              }
              else
              {
                  DBConn.Instance.Close();
                  _selectedConnStringValue = value;
                  DefaultConf.Instance.DefaultConnectionStringName = value;
              }
              OnPropertyChanged("SelectedConnStringValue");
          }
      }
  
  
      protected virtual void OnPropertyChanged(string propertyName)
      {
          PropertyChangedEventHandler handler = PropertyChanged;
          if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
  
      }
  </code></pre>
  
  <p>XAML</p>
  
  <pre><code> &lt;ComboBox x:Name="serversComboBox" SelectedValuePath="Name" DisplayMemberPath="Name" Width="120" Margin="672,0,0,0" Height="25" 
              ItemsSource="{Binding Path=Connections}" Text="{Binding SelectedConnStringValue}"/&gt;
  </code></pre>
  
  <p>The problem is when I try to put wrong connectionstring. I want then to reselect the combo value to the previous one, thus not updating it at all, but it does not work. I have tried to do         RaisePropertyChanged("SelectedConnStringValue");
          instead of OnPropertyChanged, but it does nothing</p>