title: Text Box sometimes cursor is missing
body: <p>I have created a custom water mark text box which is extended from text box. control template for the same is shown below.</p>
  
  <pre><code>&lt;Setter Property="Template"&gt;
      &lt;Setter.Value&gt;
          &lt;ControlTemplate TargetType="{x:Type controls:WaterMarkTextBox}"&gt;
              &lt;ControlTemplate.Resources&gt;
                  &lt;Storyboard x:Key="Storyboard1"&gt;
                      &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                        Storyboard.TargetName="PART_FieldTextBlock"&gt;
                          &lt;SplineThicknessKeyFrame KeyTime="0:0:0.15"
                                                   Value="0,0,10,0" /&gt;
                      &lt;/ThicknessAnimationUsingKeyFrames&gt;
                  &lt;/Storyboard&gt;
                  &lt;Storyboard x:Key="Storyboard2"&gt;
                      &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                        Storyboard.TargetName="PART_FieldTextBlock"&gt;
                          &lt;SplineThicknessKeyFrame KeyTime="0:0:0.25"
                                                   Value="0,0,-500,0" /&gt;
                      &lt;/ThicknessAnimationUsingKeyFrames&gt;
                  &lt;/Storyboard&gt;
              &lt;/ControlTemplate.Resources&gt;
              &lt;Grid x:Name="PART_GridControl"
                    ClipToBounds="True"
                    Height="{TemplateBinding Height}"
                    Width="{TemplateBinding Width}"&gt;
                  &lt;TextBlock x:Name="PART_PlaceHolderTextBlock"
                             Style="{StaticResource SWMLightTextBlockStyle}"
                             Foreground="#BDBBBB"
                             FontSize="{StaticResource SmallFontSize}"
                             Text="{TemplateBinding PlaceHolderText}"
                             VerticalAlignment="Center"
                             Margin="20,0,10,0" /&gt;
                  &lt;Border Name="border"
                          CornerRadius="0"
                          Padding="2"
                          BorderThickness="1"
                          BorderBrush="DeepSkyBlue"&gt;
                      &lt;ScrollViewer x:Name="PART_ContentHost"/&gt;
                  &lt;/Border&gt;
                  &lt;TextBlock x:Name="PART_FieldTextBlock"
                             HorizontalAlignment="Right"
                             Foreground="#BDBBBB"
                             Margin="0,0,-500,0"
                             Style="{StaticResource SWMLightTextBlockStyle}"
                             FontSize="{StaticResource SmallFontSize}"
                             TextWrapping="Wrap"
                             Text="{TemplateBinding FieldText}"
                             VerticalAlignment="Center" /&gt;
              &lt;/Grid&gt;
          &lt;/ControlTemplate&gt;
      &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
  </code></pre>
  
  <p>but while typing the textbox enters to a condition where it is having no cursor but we can type into it occurs with a probability of 1/2 chars.I wonder how it happens. Anyone is having idea how it is happening?</p>