Whenever I try to apply a style to a text field, it becomes immune to user input. Can you tell me how to solve this? Here is the xaml code I'm using:
<Style x:Key="textbox" TargetType="TextBox"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Border BorderThickness="3" Background="{TemplateBinding Background}" Name="border"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="border" Property="BorderBrush" Value="#9E5971" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>
source share