title: How to databind public property in xaml
body: <p>All I am trying to do is bind a public property to a textBlock. What am I doing wrong here?</p>
  
  <pre><code>namespace WpfApplication1
  {
  
      public partial class MainWindow : Window
      {
  
          public string test { get; set; }
  
          public MainWindow()
          {
              test = "this is a test";
              InitializeComponent();
          }
      }
  }
  
  &lt;Window x:Class="WpfApplication1.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Window.Resources&gt;
      &lt;ObjectDataProvider x:Key="test"&gt;&lt;/ObjectDataProvider&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid&gt;
      &lt;TextBlock Height="23" HorizontalAlignment="Left" Margin="108,58,0,0" Name="textBlock1"  VerticalAlignment="Top" Text="{Binding Source={StaticResource test}}" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>