Can anyone figure out what is wrong with my style? The problem started when I wanted to add rounded corners to my textboxes; it looks perfectly alright but when I test the app, the textboxes do not respond; I cannot write into them, not even by adding the Text attribute.
I couldn't figure it out until I started the UI from scratch; as soon as I apply the style to the textbox, it becomes messed up, but I cannot see anything wrong with it.
<Grid>
<TextBox x:Name="textBox" Style="{StaticResource Input}"
HorizontalAlignment="Left"
Margin="37,10,0,93"
TextWrapping=" NoWrap" />
</Grid>
<Style TargetType="TextBox" x:Key="Input">
<Setter Property="Background" Value="#FF363636"/>
<Setter Property="Foreground" Value="#FFA8A8A8"/>
<Setter Property="Height" Value="23"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border BorderThickness="1"
BorderBrush="#FF555555"
Background="{TemplateBinding Background}"
CornerRadius="2">
<ContentPresenter HorizontalAlignment="Left"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
As an added bonus, when I test it, part of the textbox disappears.
Can somebody see something I don't?