开发者

Font color of disabled buttons

开发者 https://www.devze.com 2023-02-06 18:21 出处:网络
How do I find the exact gray color of a font when the IsEnabled property of a button is false?It appears th开发者_高级运维at there are subtle differences between versions of windows, so I want to get

How do I find the exact gray color of a font when the IsEnabled property of a button is false? It appears th开发者_高级运维at there are subtle differences between versions of windows, so I want to get this color from the system to ensure IsEnable colors match.


If you look at the control template here:

http://msdn.microsoft.com/en-us/library/ms753328.aspx

You can see that the foreground colour when the button is disabled is defined as follows:

<Color x:Key="DisabledForegroundColor">#FF888888</Color>

You should be able to look up DisabledForegroundColor (this.Resources["DisabledForegroundColor"]) from your code.

0

精彩评论

暂无评论...
验证码 换一张
取 消