title: Two way databinding in winforms, Inotifypropertychanged implemented in base class
body: <p>I use Winforms Databinding and I have derived classes, where the base class implements <code>IPropertychanged</code> :</p>
  <pre><code>    public event PropertyChangedEventHandler PropertyChanged;
  
      private void RaisePropertyChanged(string propertyName) {
          var handler = this.PropertyChanged;
          if (handler != null) {
              handler(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  </code></pre>
  <p>Each propertysetter calls:</p>
  <pre><code>    protected void SetField&lt;T&gt;(ref T field, T value, string propertyName) {
          if (!EqualityComparer&lt;T&gt;.Default.Equals(field, value)) {
              field = value;
              IsDirty = true;
              this.RaisePropertyChanged(propertyName);
          }
      }
  </code></pre>
  <p>A typical Propertysetter:</p>
  <pre><code>    public String LocalizationItemId {
          get {
              return _localizationItemId;
          }
          set {
               SetField(ref _localizationItemId, value, &quot;LocalizationItemId&quot;);
          }
      }
  </code></pre>
  <p>The way a property is bound to a textbox</p>
  <pre><code>        private DerivedEntity derivedEntity
          TextBoxDerivedEntity.DataBindings.Add(&quot;Text&quot;, derivedEntity, &quot;Probenname&quot;);
  </code></pre>
  <p>If I programmatically assign text to the textbox, the textbox does not show it. But I can manually edit the textbox.</p>