title: Binding to a ViewModel's Child Class Properties
body: <p>I'm struggling to be able to bind a StatusBarItem content element in my view to a subclasses property in my ViewModel, I'm using the MVVM-Light framework/</p>
  
  <p>ViewModel:</p>
  
  <pre><code>public class PageMainViewModel : ViewModelBase
  {
      LoggedOnUserInfo UserInfo;
  
      public LoggedOnUser UserInfo
      {
         set
         {
            _UserInfo = value;
            RaisePropertyChanged("UserInfo");
         }
      }
  }
  </code></pre>
  
  <p>For full clarity the LoggedOnUser Class is defined as follows</p>
  
  <pre><code>public class LoggedOnUser : INotifyPropertyChanged
  {
      private string _Initials;        
  
      public event PropertyChangedEventHandler PropertyChanged;            
  
      public LoggedOnUser()
      {
  
      }
  
      [DataMember]
      public string Initials
      {
          get { return _Initials; }
          set 
          { 
               _Initials = value;
              OnPropertyChanged("Initials");
          }
      }
  
      protected void OnPropertyChanged(string propValue)
      {
          PropertyChangedEventHandler handler = PropertyChanged;
          if (handler != null)
          {
              handler(this, new PropertyChangedEventArgs(propValue));
          }
      }
  
  }
  </code></pre>
  
  <p>My Views DataContext is being set and is working as I am able to see other bindings working, but my attempts to bind to UserInfo.Initials property in my XAML are producing an empty result.</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;StatusBarItem Grid.Column="0" Content="{Binding UserInfo.Initials}" Margin="5,0,0,0" VerticalAlignment="Center" Focusable="False" /&gt;
  </code></pre>
  
  <p>The UserInfo property is set after the viewModel is created due to several factors but I thought with my propertychanged events this would be ok.</p>
  
  <p>Any Advice on this would be greatly appreciated.</p>