title: WPF: Custom control that binds its content to a label
body: <p>I want to write a custom control that's used like this:</p>
  
  <pre><code>&lt;HorizontalTick&gt;Some string&lt;/HorizontalTick&gt;
  </code></pre>
  
  <p>It should render like this:</p>
  
  <p>-- Some string -------------------------------------------</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;UserControl x:Class="WeatherDownloadDisplay.View.HorizontalTick"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               mc:Ignorable="d" d:DesignWidth="348"
               Name="controlRoot"&gt;
      &lt;DockPanel LastChildFill="True"&gt;
          &lt;UserControl VerticalAlignment="Center" BorderBrush="Black" BorderThickness="1" Width="10"/&gt;
          &lt;Label Content="???" /&gt;
          &lt;UserControl VerticalAlignment="Center" BorderBrush="Black" BorderThickness="1"/&gt;
      &lt;/DockPanel&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>It works except for the label binding.  Can someone help me fill in the question marks?  I thought about using a ContentPresenter but it seems like an inline binding would be best.</p>
  
  <p>-Neal</p>