I created a style for my textbox, and in order to give it custom border I decided to temper with its ControlTemplate
, but when I run the project the cursor does not seem to show in the textbox, why is this and how can I fix it?
The code for my style is below
<Style x:Key="PrimaryTextBox" TargetType="{x:Type TextBox}">
<Setter Property="BorderBrush" Value="#FFBAC7DC"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="MinWidth" Value="40"/>
<Setter Property="BorderBrush" Value="#FF07172B"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Padding" Value="4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border CornerRadius="3" Padding="4"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{TemplateBinding Text}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
And its implementation
<TextBox Style="{StaticResource PrimaryTextBox}"/>