title: Specify static text value in a ContentControl with a DataTemplate
body: <p>I'm creating an application that will be used to edit a lot of product specifications in a single window.</p>
  
  <p>I have a bunch of dimensions (in inches) and I want to create a simple template that will show, for each dimension, the value both as a fraction and as a decimal value.
  It's basically a TextBlock, and two TextBox.</p>
  
  <p><img src="https://i.imgur.com/h3mKoLC.png" alt="inches control UI" title="Inches template example"></p>
  
  <p>But I can't figure how to specify the text of the TextBlock (in this case Width).<br>
  I would like to be able to specify it in the ContentControl declaration (or something similar).</p>
  
  <p>Here's my DataTemplate :</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;DataTemplate x:Key="InchesInputTemplate"&gt;
          &lt;StackPanel&gt;
              &lt;TextBlock Text="{Binding}" /&gt; &lt;!-- How should I define the binding ? --&gt;
              &lt;TextBox Text="{Binding RelativeSource={RelativeSource AncestorType=ContentControl}, Path=Content, Converter=InchesToFractionConverter}" /&gt;
              &lt;TextBox Text="{Binding RelativeSource={RelativeSource AncestorType=ContentControl}, Path=Content}" /&gt;
          &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>and then I use it in a ContentControl : </p>
  
  <pre><code>&lt;ContentControl Content="{Binding Width}" 
                  ContentTemplate="{StaticResource InchesInputTemplate}"
                  LabelText="Width :" /&gt;
  </code></pre>
  
  <p>And my simplified Product class (it will contain many more dimensions) :</p>
  
  <pre><code>public class Product
  {
      private string _productCode;
  
      public string ProductCode
      {
          get { return _productCode; }
          set { _productCode = value; }
      }
  
      private float _width;
  
      public float Width
      {
          get { return _width; }
          set { _width = value; }
      }
  }
  </code></pre>
  
  <p>What would be the best way to specify the text of the Label for each of my dimensions (LabelText property in my example) ?</p>