title: WPF TextBlock Binding to a String
body: <p>I want to bind a TextBlock to a string which takes its value from a txt file. The string is correctly filled but its contents are not displayed.</p>
  
  <p><em>Class file:</em></p>
  
  <pre><code>public partial class JokesMessageBox : Window
      {
          public JokesMessageBox()
          {
              InitializeComponent();
          }
  
          public string Joke { get; set; }
          public string path = "data/jokes.txt";
  
          public void ReadFile(string path)
          {
              Joke = File.ReadAllText(path);
          }
      }
  </code></pre>
  
  <p><em>XAML:</em></p>
  
  <pre><code>&lt;TextBlock HorizontalAlignment="Left" Margin="22,10,0,0"
   TextWrapping="Wrap" Text="{Binding Joke}" VerticalAlignment="Top"
   Height="60" Width="309"/&gt;
  </code></pre>
  
  <p>EDIT:</p>
  
  <p><em>In the MainWindow class:</em></p>
  
  <pre><code> private void btnJokesFirstScreen_Click_1(object sender, RoutedEventArgs e)
          {
    JokesMessageBox jkb = new JokesMessageBox();
                  jkb.Show();
                  jkb.ReadFile("data/jokes.txt");
          }
  </code></pre>
  
  <p>I spent 3+ hours on google, youtube, MSDN, StackOverflow and still can't get it working. What am I missing?</p>