0

Im using this xaml design for a rounder textbox and it works, the only problem is the caret is disappeared, I tried changing the CaretBrush but still the same problem Here is the xaml

    <TextBox x:Name="db" Margin="10" Height="54"  
             CaretBrush="Red"
             BorderBrush="Gray" >

        <TextBox.Template>
            <ControlTemplate TargetType="TextBox">

                <Border Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            CornerRadius="10">

                    <ContentPresenter Content="{TemplateBinding Text}"

                                      Margin="10,5,5,5" 
                                      />

                </Border>



            </ControlTemplate>



        </TextBox.Template>
    </TextBox>
Ibraheem Al-Saady
  • 854
  • 3
  • 14
  • 30
  • At first I was going to say this was way overkill, than I looked at the template for TextBox and saw the CornerRadius property isn't template bound (which is disappointing) but if it were me I'd just go and update the actual template and turn that property into Template bindings so you could just pass them through at the instance level without all the extra fuss. – Chris W. Jul 21 '14 at 17:30
  • This [Link][1] would be helpful, try to search more and more [1]: http://stackoverflow.com/questions/18349444/xaml-textblock-set-round-corner – Abdullah El-Menawy Jul 21 '14 at 21:39

0 Answers0