Why doesn't this simple Style work for a TextBox? I expect the background/foreground colors to change when I change the text between "0" and "1" ...
<Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Gray"/>
<Style.Triggers>
<!-- If the Textbox holds a value of 1, then update the foreground/background -->
<DataTrigger Binding="{Binding Path=Text}" Value="1">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
</DataTrigger>
<!-- If the Textbox holds a value of 0, then update the foreground/background -->
<DataTrigger Binding="{Binding Path=Text}" Value="0">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>