1

I want to change my TextBox Background color while my control IsEnable = false:

<Style TargetType="{x:Type TextBox}">
    <Style.Triggers>
        <Trigger Property="IsEnabled" Value="false">
            <Setter Property="Background" Value="#00ffffff"/>
        </Trigger>
    </Style.Triggers>
</Style>

But it seems that this not effect at all and now my Backgroung color is transparent and my Watermark (i am using MahApps) is missing.

mot rer
  • 153
  • 2
  • 9
  • possible duplicate of [BackgroundColor of a disabled TextBox](http://stackoverflow.com/questions/3957509/backgroundcolor-of-a-disabled-textbox) – Abin Aug 03 '15 at 19:34
  • http://stackoverflow.com/a/3752517/2470362 – Abin Aug 03 '15 at 19:38

1 Answers1

1

You have set the opacity part (first 2 digits) of the HEX colour to transparent (00).

<Setter Property="Background" Value="#ffffffff"/>
Glen Thomas
  • 10,190
  • 5
  • 33
  • 65