How to change disabled background color of TextBox in WPF

前端 未结 7 2136
野趣味
野趣味 2020-11-27 06:45

I\'ve seen the following thread which is related to my question:

WPF ComboBox: background color when disabled

The above deals with changing the Content Temp

7条回答
  •  温柔的废话
    2020-11-27 07:34

    If you look at the template of the textbox, you will notice that the template has a trigger for the IsEnabled property False, and sets it's border element "Bd" background color to SystemColors.ControlBrushKey.

    If you override this color in a style, it will achieve what you want to do.

    
    

提交回复
热议问题