title: Setting Custom Properties in UserControl via DataBinding
body: <p>Say I have a very simple UserControl that - for all intents and purposes - is nothing more than TextBox:</p>
  
  <pre><code>public partial class FooBox : UserControl
  {
      public static readonly DependencyProperty FooTextProperty =
          DependencyProperty.Register("FooText", typeof(string), typeof(FooBox));
  
      public FooBox()
      {
          InitializeComponent();
      }
  
      public string FooText
      {
          get { return textBlock.Text; }
          set { textBlock.Text = value; }
      }
  }
  
  &lt;UserControl x:Class="Namespace.FooBox"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Height="300" Width="300"&gt;
      &lt;Grid&gt;
          &lt;TextBlock x:Name="textBlock" /&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>On the form it's declared as:</p>
  
  <pre><code>&lt;local:FooBox FooText="{Binding Name}" /&gt;
  </code></pre>
  
  <p>The form's DataContext is set to an object that has a Name property.  But this is not working for me.  What am I missing?</p>