title: TextBlock Databinding
body: <p>When I run following code textblock is not changing.</p>
  
  <p>My guess is databinding is missing either in code or XMAL.</p>
  
  <p><strong>XAML</strong>
      </p>
  
  <pre><code>    &lt;Window.Resources&gt;
          &lt;ObjectDataProvider x:Key="PersonObj" ObjectType="{x:Type local:Person}" MethodName="GetFirstName" /&gt;
      &lt;/Window.Resources&gt;
  
      &lt;Grid&gt;
          &lt;!--&lt;TextBlock  Margin="26,7,12,0" Name="myTextBlock" Text="{Binding Path=FirstName}" Height="69" VerticalAlignment="Top" /&gt;--&gt;
          &lt;TextBlock Margin="26,7,12,0" Name="myTextBlock" Text="{Binding FirstName, Source={StaticResource PersonObj}}" Height="69" VerticalAlignment="Top" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>namespace WpfApplication1
  {
  
      public partial class Window1 : Window
      {
          public Window1()
          {
              InitializeComponent();
              test t = new test();
          }
          public void testing()
          {
              test t = new test();
          }    
      }
  
      public class Person
      {
          public String FirstName { get; set; }
          public String LastName { get; set; }
  
          public string GetFirstName()
          {
              return FirstName;
          }
      }
  }
  
  namespace WpfApplication1
  {
      class test : Person
      {
          public test()
          {
                   this.FirstName = "John";
                   this.LastName = "S";
                   this.GetFirstName();
          }
  
      }
  }
  </code></pre>
  
  <p>Thanks</p>