You have replaced the default XAML that makes the TextBox
'grayed out' when IsEnabled
is set to False
. If you want to replace this functionaluity, you will need to copy that part of the original ControlTemplate
, which you can find at the TextBox Styles and Templates
page on MSDN.
In the default ControlTemplate
, you will see a VisualState
with the name Disabled
... that is what you need, but you may as well copy most of the VisualState
s from there.
<VisualState x:Name="Disabled">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource DisabledControlLightColor}" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>