title: Caret not shown in textbox
body: <p>I use following style for my textbox in WPF:</p>
  
  <pre><code>&lt;Style x:Key="myTxtBoUserInputMedStyle" TargetType="{x:Type TextBox}"&gt;
      &lt;Setter Property="Height" Value="35"/&gt;
      &lt;Setter Property="Background" Value="Gainsboro"/&gt;
      &lt;Setter Property="BorderBrush" Value="LightGray"/&gt;
      &lt;Setter Property="BorderThickness" Value="0.5"/&gt;
      &lt;Setter Property="HorizontalAlignment" Value="Center"/&gt;
      &lt;Setter Property="VerticalAlignment" Value="Center"/&gt;
      &lt;Setter Property="HorizontalContentAlignment" Value="Center"/&gt;
      &lt;Setter Property="VerticalContentAlignment" Value="Center"/&gt;
      &lt;Setter Property="FontSize" Value="14"/&gt;
      &lt;Setter Property="Padding" Value="2,2,2,2"/&gt;
      &lt;Setter Property="Foreground" Value="Black" /&gt;
      &lt;Setter Property="FontWeight" Value="Normal"/&gt;
      &lt;Setter Property="Height" Value="25"/&gt;
      &lt;Setter Property="SnapsToDevicePixels" Value="True"/&gt;
      &lt;Setter Property="BorderBrush" Value="Black"/&gt;
      &lt;Setter Property="Background" Value="LightGray"/&gt;
      &lt;Setter Property="Foreground" Value="Black"/&gt;
      &lt;Setter Property="CaretBrush" Value="Black"/&gt;
      &lt;EventSetter Event="KeyDown" Handler="TextBoxKeyDownHandler"/&gt;
      &lt;EventSetter Event="GotFocus" Handler="TextBoxGotFocusHandler"/&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type TextBox}"&gt;
                  &lt;Border BorderBrush="{TemplateBinding BorderBrush}" 
                          BorderThickness="{TemplateBinding BorderThickness}" 
                          Background="{TemplateBinding Background}"
                          VerticalAlignment="Center"
                          HorizontalAlignment="Center"
                          TextElement.Foreground="Black"
                          CornerRadius="2"&gt;
                     &lt;ContentPresenter
                          Content="{TemplateBinding Text}"
                          Width="145"
                          VerticalAlignment="Center"
                          HorizontalAlignment="Center"
                          Height="24" Margin="5,0,0,0"&gt;
                      &lt;/ContentPresenter&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsFocused" Value="True"&gt;
                          &lt;Setter Property="Background" Value="LightBlue"/&gt;
                          &lt;Setter Property="Foreground" Value="Black"/&gt;
                          &lt;Setter Property="FontWeight" Value="Bold"/&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>The GotFocusEvent is implemented like that:</p>
  
  <pre><code>private void TextBoxGotFocusHandler(object sender, RoutedEventArgs e)
  {
      TextBox tb = (TextBox)sender;
      if (tb.SelectedText.Length == 0)
      {
          tb.CaretIndex = tb.Text.Length;
      }
  }
  </code></pre>
  
  <p>But my problem is that the Caret is never shown in my textbox.
  If i use the textbox without my style i can see the care. So it must be related to my style.
  How do i have to change my style to show the caret?</p>
  
  <p>Thanks in advance!</p>