I have created a kind of custom TextBox
in Expression Blend. I have changed the fill of the background and border to a gradient, and added in a Shadow Effect.
I've noticed that when I mouseover or focus my TextBox
, some default behavior/(style?) of WPF takes over and my border is changed.
I was wondering if there was anyway to prevent or stop WPF from changing my TextBox
es style when I focus or mouseover it. Is this possible?
The easier solution is just set texbox border thickness to 0, then wrap texbox to your own border:
<Border BorderBrush="LightGray" BorderThickness="1">
<TextBox Text="{Binding OutlinePlain, Mode=TwoWay, NotifyOnTargetUpdated=True}"
BorderThickness="0"
</TextBox>
</Border>