title: Easy way to add a Label to the WPF ComboBox control
body: <p>This code is becoming more common in my application:</p>
  
  <pre><code>&lt;StackPanel Orientation="Vertical"&gt;
      &lt;Label Content="_ComboBox Caption" 
             Target="comboBox" 
             Margin="0" 
             Padding="5,5,5,1" /&gt;
  
      &lt;ComboBox  x:Name="comboBox"
                  Width="72"
                  Margin="5,0,5,5"
                  Padding="5,1,5,5"
                  SelectedItem="{Binding ComboSelectedItem}"
                  ItemsSource="{Binding ComboSourceList}" /&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>It renders me a Captioned ComboBox.</p>
  
  <p>I would like to make me a custom control that is a ComboBox that exposes the Label's content and then sets the other properties up.  Something that could be used like this:</p>
  
  <pre><code>&lt;Controls:CaptionedComboBox  x:Name="comboBox"
                               Width="72"
                               LabelContent="_ComboBox Caption"
                               SelectedItem="{Binding ComboSelectedItem}"
                               ItemsSource="{Binding ComboSourceList}" /&gt;
  </code></pre>
  
  <p>However, I looked into making a custom control and there is a <strong>daunting</strong> amount of styling that is needed.  </p>
  
  <p>Is there a way to take what I have above and end up doing something like this?</p>
  
  <pre><code>&lt;StackPanel Orientation="Vertical"&gt;
      &lt;Label Content="{Binding TemplateLabelContent}" 
             Target="{Binding ControlName}" 
             Margin="0" 
             Padding="5,5,5,1" /&gt;
  
      &lt;InheritedComboBoxStuff/&gt;
  
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>I know that will not work.  But my point is that is seems silly that I have to re-style the whole ComboBox just to add a label above it.</p>