title: WPF: Bind property to TextBlock not working
body: <p>I have below xaml file (this a piece):</p>
  
  <pre><code>                        &lt;Grid Opacity="1" Margin="5"&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;                                
                              &lt;/Grid.RowDefinitions&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;                                   
                              &lt;/Grid.ColumnDefinitions&gt;
  
                              &lt;Label Grid.Row="0" Grid.Column="0" Content="ID"/&gt;
                              &lt;Label Grid.Row="0" Grid.Column="1" Content="Name"/&gt;
                              &lt;Label Grid.Row="0" Grid.Column="2" Content="Description"/&gt;                                
  
                              &lt;TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding ID}"/&gt;
                              &lt;TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Name}"/&gt;
                              &lt;TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Description}"/&gt;
  
                          &lt;/Grid&gt;
  </code></pre>
  
  <p>Below the <strong>Data Class</strong>:</p>
  
  <pre><code>public class Data : INotifyPropertyChanged
  {        
      private string id= string.Empty;
      private string name = string.Empty;
      private string description = string.Empty;
  
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void NotifyPropertyChanged(String propertyName)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  
      public string ID
      {
          get
          {
              return this.id;
          }
  
          set
          {
              if (value != this.id)
              {
                  this.id = value;
                  NotifyPropertyChanged("ID");
              }
          }
      }
  
      public string Name
      {
          get
          {
              return this.name;
          }
  
          set
          {
              if (value != this.name)
              {
                  this.name = value;
                  NotifyPropertyChanged("Name");
              }
          }
      }
  
      public string Description
      {
          get
          {
              return this.description;
          }
  
          set
          {
              if (value != this.description)
              {
                  this.description = value;
                  NotifyPropertyChanged("Description");
              }
          }
      }
  }
  </code></pre>
  
  <p>Also in <strong>xaml.cs</strong> I implement INotifyPropertyChanged:</p>
  
  <pre><code>    public event PropertyChangedEventHandler PropertyChanged;
      private void NotifyPropertyChanged(String info)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(info));
          }
      }
  </code></pre>
  
  <p>Furthermore, in the above <strong>xaml</strong> I have a button defined as:</p>
  
  <pre><code>&lt;Button Click="btn_Click"/&gt;
  </code></pre>
  
  <p>and the implementation for that is in <strong>xaml.cs</strong> as below:</p>
  
  <pre><code>    private void btn_Click(object sender, System.Windows.RoutedEventArgs e)
      {
        (DataContext as MyViewModel).SearchInDb('0303003'); // 0303003 -&gt; this is only an example.
      }
  </code></pre>
  
  <p>On button click a method on MyViewModel class is called, and from there it invokes a query to database to retrieve data using ID = 0303003.</p>
  
  <p>Below <strong>MyViewModel class</strong> (I show only the method):</p>
  
  <pre><code> public void SearchInDb(string id)
   {
        // request data to sql server database
        // and then populate a Data Class Object with the data retrieved
        // from database:
  
        Data = new Data(){                            
                  ID = sReader[0].ToString().Trim(),
                  Name = sReader[1].ToString().Trim(),
                  Description = sReader[2].ToString().Trim()
               };
   }
  </code></pre>
  
  <p>Note: MyViewModel class does not implement INotifyPropertyChanged.</p>
  
  <p><strong>My problem is the following</strong>:</p>
  
  <p>After populating a new Data object within above method "SearchInDb", my labels in the grid are not updated, they remain empty.</p>