title: Binding issue MVVM
body: <p>I have a ListBox that is populated through a ViewModel and a DataTemplate in which I also have a binding. The problem is the binding in the DataTemplate is not working. Here is my code:</p>
  
  <p><strong>ViewModel:</strong></p>
  
  <pre><code>private void NotifyPropertyChanged(string propertyName)
  {
      PropertyChangedEventHandler handler = PropertyChanged;
  
      if (null != handler)
      {
          handler(this, new PropertyChangedEventArgs(propertyName));
      }
  }
  #endregion
  
  private string strHeaderText;
  public string HeaderText
  {
      get
      {
          if (null != this.Trips)
          {
              if (null != this._trips.name)
              {
                  return this._trips.name;
              }
          }
  
          return "Trip";
      }
      set
      {
          this.strHeaderText = value;
      }
  }
  
  public TripTypeViewModel()
  {
      this.TripTypeViewModelDataSource.Clear();
  
      foreach (TripType tt in TripsResponseTypeViewModelDataSource.FirstOrDefault().Trip)
      {
          this.TripTypeViewModelDataSource.Add(tt);
      }
  }
  ...
  
  private ObservableCollection&lt;TripType&gt; tripTypeViewModelDataSource;
  public ObservableCollection&lt;TripType&gt; TripTypeViewModelDataSource
  {
      get
      {
          if (null == this.tripTypeViewModelDataSource)
          {
              this.tripTypeViewModelDataSource = new ObservableCollection&lt;TripType&gt;();
          }
  
          return this.tripTypeViewModelDataSource;
      }
  } 
  </code></pre>
  
  <p>Here is my <strong>View</strong></p>
  
  <pre><code> &lt;ListBox x:Name="ItemsLB" ItemsSource="{Binding tripTypeViewModel.TripTypeViewModelDataSource}"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Content="{Binding tripTypeViewModel.HeaderText}" Width="Auto" Height="Auto"/&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>