title: WPF bind combobox selected value to a string in a view model
body: <p>I have this combobox in my view:</p>
  
  <pre><code>&lt;ComboBox SelectedValue="{Binding StringObj, UpdateSourceTrigger=PropertyChanged}"&gt;
         &lt;ComboBoxItem&gt;string0&lt;/ComboBoxItem&gt;
         &lt;ComboBoxItem&gt;string1&lt;/ComboBoxItem&gt;
         &lt;ComboBoxItem&gt;string2&lt;/ComboBoxItem&gt;
         &lt;ComboBoxItem&gt;string3&lt;/ComboBoxItem&gt;
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p>And in my view model I have this string object:</p>
  
  <pre><code>    private string _stringObj;
      public string StringObj
      {
          get { return _stringObj; }
          set { _stringObj = value; }
      }
  </code></pre>
  
  <p>How can I bind the selected value from the combobox to the string variable so I can work with it in the view model? This is what I have implemented so far but it doesn't work as I don't understand this binding stuff very well.</p>