开发者

Font color of disabled buttons

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜