title: How to display caret in custom WPF text box
body: <p>I have designed my own text box in WPF by creating my own custom control template.  However, I cannot seem to get the caret to show up.</p>
  
  <p>Here is my TextBox style:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type TextBox}"&gt;
          &lt;Setter Property="SnapsToDevicePixels" Value="True"/&gt;
          &lt;Setter Property="OverridesDefaultStyle" Value="True"/&gt;
          &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="None"/&gt;
          &lt;Setter Property="FocusVisualStyle" Value="{x:Null}"/&gt;
          &lt;Setter Property="AllowDrop" Value="True"/&gt;
          &lt;Setter Property="TextBlock.Foreground" Value="DeepSkyBlue"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type TextBox}"&gt;
                      &lt;Border
                          Name="border"
                          CornerRadius="0"
                          Padding="2"
                          BorderThickness="1"
                          BorderBrush="DeepSkyBlue"&gt;
                          &lt;ContentPresenter
                              HorizontalAlignment="Left" 
                              VerticalAlignment="Top"
                              Content="{TemplateBinding Text}"
                              Name="content"/&gt;
                      &lt;/Border&gt;
                      &lt;ControlTemplate.Triggers&gt;
                          &lt;Trigger Property="IsEnabled" Value="True"&gt;
                              &lt;Setter Property="Background" Value="MidnightBlue"/&gt;
                              &lt;Setter Property="BorderBrush" Value="DeepSkyBlue"/&gt;
                              &lt;Setter Property="Foreground" Value="DeepSkyBlue"/&gt;
                          &lt;/Trigger&gt;
                      &lt;/ControlTemplate.Triggers&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>So how can I get my caret to show up?  I want it to be MidnightBlue so it is visible over the DeepSkyBlue background.</p>