title: Why does WPF support binding to properties of an object, but not fields?
body: <p>I've got a WCF service that passes around status updates via a struct like so:</p>
  
  <pre><code>[DataContract]
  public struct StatusInfo
  {
      [DataMember] public int Total;
      [DataMember] public string Authority;
  }
  ...
  public StatusInfo GetStatus() { ... }
  </code></pre>
  
  <p>I expose a property in a ViewModel like this:</p>
  
  <pre><code>public class ServiceViewModel : ViewModel
  {
      public StatusInfo CurrentStatus
      {
          get{ return _currentStatus; }
          set
          { 
              _currentStatus = value;
              OnPropertyChanged( () =&gt; CurrentStatus );
          }
      }    
  }
  </code></pre>
  
  <p>And XAML like so:</p>
  
  <pre><code>&lt;TextBox Text="{Binding CurrentStatus.Total}" /&gt;
  </code></pre>
  
  <p>When I run the app I see errors in the output window indicating that the Total property cannot be found. I checked and double checked and I typed it correctly. The it occurred to me that the errors specifically indicate that the 'property' cannot be found. So adding a property to the struct made it work just fine. But this seems odd to me that WPF can't handle one-way binding to fields. Syntactically you access them the same in code and it seem silly to have to create a custom view model just for the StatusInfo struct. Have I missed something about WPF binding? Can you bind to a field or is property binding the only way?</p>