title: Custom WPF DatePickerTextBox Template
body: <p>I am trying to use a custom <code>TextBox</code> in the <code>DatePicker</code> control, but I can't get the date to bind from the popup calendar to the <code>TextBox</code>. I don't want to have to style the entire <code>DatePicker</code> unless I have to, and the <code>DatePickerTextBox</code> has its own control, so there must be a way to only alter it. The code below is what I have as a start:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type DatePickerTextBox}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type DatePickerTextBox}"&gt;
                  &lt;TextBox x:Name="PART_TextBox" Text="{Binding Path=SelectedDate}" /&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>I may not be doing the binding correctly, or the <code>PART_TextBox</code> may not be right since it's not part of the <code>DatePicker</code> template itself.</p>
  
  <p>Someone please help! :)</p>
  
  <p>Thanks in advance!</p>