title: Silverlight ComboBox SelectedValue TwoWay Binding not working
body: <p>I have used many ComboBoxes in my applications and all of them are working without any problem. But, I can't find the problem now. I have set SelectedValuePath to "Tag" property. But the property not updating after changing the ComboBox selected item. I have read other StackOverflow questions, but nontheless helped.</p>
  
  <p>It is xaml:</p>
  
  <blockquote>
    <p>xmlns:vms="clr-namespace:SilverlightApplication1"</p>
  </blockquote>
  
  <pre><code>&lt;UserControl.DataContext&gt;
      &lt;vms:MainViewModel /&gt;
  &lt;/UserControl.DataContext&gt;
  
  &lt;Grid x:Name="LayoutRoot" Background="White"&gt;
      &lt;ComboBox Width="100" VerticalAlignment="Center" FontFamily="Segoe UI"
           Height="30" Margin="0,5,0,0"  HorizontalAlignment="Left" 
           SelectedValue="{Binding SelectedDifStatusComparer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
           SelectedValuePath="Tag"&gt;
          &lt;ComboBox.Items&gt;
              &lt;ComboBoxItem Tag="H" &gt;High&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Tag="L" &gt;Low&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Tag="E" &gt;Equal&lt;/ComboBoxItem&gt;
          &lt;/ComboBox.Items&gt;
      &lt;/ComboBox&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>And here is the ViewModel:</p>
  
  <pre><code>public class MainViewModel : INotifyPropertyChanged
      {
          public event PropertyChangedEventHandler PropertyChanged;
          private void OnPropertyChanged(string propertyName)
          {
              if (PropertyChanged != null)
              {
                  PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
              }
          }
  
          private string _selectedDifStatusComparer = "";
          private string SelectedDifStatusComparer
          {
              get { return _selectedDifStatusComparer; }
              set
              {
                  _selectedDifStatusComparer = value;
                  MessageBox.Show(_selectedDifStatusComparer);
                  OnPropertyChanged("SelectedDifStatusComparer");
              }
          }
  
          public MainViewModel()
          {
              SelectedDifStatusComparer = "E"; // It is working, the MessageBox is apperaing
          }
      }
  </code></pre>