title: TextBox binding in WPF
body: <p>I have a textbox in XAML file, On Changing the text in the textbox the prop setter is not getting called. I am able to get the value in ProjectOfficer textbox and not able to update it. I am using MVVM pattern</p>
  
  <p>Below is my code XAML</p>
  
  <pre><code> TextBox Text="{Binding Path=Officer,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
                                  x:Name="ProjectOfficer"/&gt;
  </code></pre>
  
  <p>ViewModel.cs</p>
  
  <pre><code>    public Staff Officer 
      { 
          get 
          { 
              return __con.PrimaryOfficer  ; 
          } 
          set 
          { 
              _con.PrimaryOfficer = value; 
             _con.PrimaryOfficer.Update(true); 
           } 
      }
  </code></pre>
  
  <p>Staff.cs</p>
  
  <pre><code>public class Staff : EntityBase 
  { 
      public Staff();
  
      public string Address { get; } 
      public string Code { get; set; } 
      public override void Update(); 
  }
  </code></pre>
  
  <p>Thanks</p>