title: WPF C# Binding behaving strangely
body: <p>So I have a c# wpf application with a default layout and different <code>UserControls</code> to fill one part of that layout. So far everything worked like a charm with binding properties, but now that i created another <code>UserControl</code> the binding only seems to work <code>OneWay</code>. </p>
  
  <p><strong>View -> ViewModel</strong> works great, I can trace button clicks, comboboxes being checked and all that stuff, but ...</p>
  
  <p><strong>ViewModel -> View</strong> doesn't want to work at all. </p>
  
  <p>I've tried setting the Mode of the Bindings to <code>TwoWay</code> and setting <code>UpdateSourceTrigger</code> to <code>PropertyChanged</code>, but nothing changes.</p>
  
  <p>This is my View:</p>
  
  <pre><code>&lt;UserControl ...
        xmlns:vm="clr-namespace:Prueftool.BBCCreatorViewModel"
        d:DesignHeight="300" d:DesignWidth="300"&gt;
  
      &lt;UserControl.DataContext&gt;
          &lt;vm:CreateDisplayTypeViewModel/&gt;
      &lt;/UserControl.DataContext&gt;
  
      &lt;Grid&gt;
          &lt;Button Content="Button" Width="75" Command="{Binding TestButtonClick}"/&gt;
          &lt;CheckBox Content="CheckBox" IsChecked="{Binding TestIsChecked}"/&gt;
  
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>And here is my referenced ViewModel:</p>
  
  <pre><code>namespace Prueftool.BBCCreatorViewModel
  {
      class CreateDisplayTypeViewModel : ViewModelBase, ICreateDisplayViewModel
      {
  
          private bool _testIsChecked;
          public bool TestIsChecked
          {
              get { return _testIsChecked; }
              set
              {
                  _testIsChecked = value;
                  OnPropertyChanged("TestIsChecked");              
              }
          }
  
          public void SetNewDisplayType(DisplayType selectedDisplayType)
          {
  
              if(selectedDisplayType.Name == "Default")
              {
  
                  TestIsChecked = true;    
              }
  
          }
  
  
          private DelegateCommand _random;
          public ICommand RandomButtonClick
          {
              get
              {
                  if (_random == null)
                  {
                      _random = new DelegateCommand(randomButtonClick);
                  }
                  return _random;
              }
          }
  
  
          private void randomButtonClick()
          {
              if(TestIsChecked)
              {
                  MessageBox.Show("Hello World");
              }
          }
  
      } 
  }
  </code></pre>
  
  <p>The <code>SetNewDisplayType</code> method is being called and the if statement is true, but it won't check my combobox in the view. On the other hand, checking the combobox manually and then pressing the button fires the <code>randomButtonClick</code> method and a MessageBox appears.</p>
  
  <p>EDIT:</p>
  
  <p>OnPropertyChanged method (not mine)</p>
  
  <pre><code>#region public virtual void OnPropertyChanged()
          /// &lt;summary&gt;
          /// Raises this object's PropertyChanged event.
          /// &lt;/summary&gt;
          /// &lt;param name="propertyName"&gt;The property that has a new value.&lt;/param&gt;
          public virtual void OnPropertyChanged(string propertyName)
          {
              this.VerifyPropertyName(propertyName);
  
              PropertyChangedEventHandler handler = this.PropertyChanged;
              if (handler != null)
              {
                  var e = new PropertyChangedEventArgs(propertyName);
                  handler(this, e);
              }
          }
          #endregion
  </code></pre>