I have this code:
<Style x:Key="qwe" TargetType="{x:Type TextBox}">
<Style.Triggers>
<Trigger Property="Text" Value="qwe">
<Setter Property="IsEnabled" Value="False"/>
</Trigger>
</Style.Triggers>
</Style>
But when I have “qwe” in TextBox, It is still enabled.
What is wrong?
You referenced the style on some TextBox, right?
Works for me…
Make sure you don’t override the trigger by setting IsEnabled on the TextBox itself.