title: How to read a passed parameter in a WPF UserControl?
body: <p>I created a user control in WPF:</p>
  
  <pre><code>&lt;UserControl x:Class="TestUserControl.Controls.GetLatest"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
          &lt;TextBlock Name="theTextBlock"/&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>The code behind has a parameter called "FirstMessage" which it sets as the text of my user control TextBlock:</p>
  
  <pre><code>public partial class GetLatest : UserControl
  {
      public string FirstMessage { get; set; }
  
      public GetLatest()
      {
          InitializeComponent();
          theTextBlock.Text = this.FirstMessage;
      }
  }
  </code></pre>
  
  <p>In my main code I can set the FirstMessage parameter in my user control with intellisense:</p>
  
  <pre><code>&lt;Window x:Class="TestUserControl.Window1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Window1" Height="300" Width="300"
      xmlns:controls="clr-namespace:TestUserControl.Controls"
      &gt;
      &lt;StackPanel&gt;
          &lt;controls:GetLatest FirstMessage="This is the title"/&gt;
      &lt;/StackPanel&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>However, it still doesn't set the text. I've tried Text="{Binding Path=FirstMessage}" and other syntaxes I have found but nothing works.</p>
  
  <p>How can I access the FirstMessage value in my user control?</p>