简体   繁体   English

WPF系统颜色的符号名称?

[英]Symbolic names for WPF system colors?

Where can I get symbolic names for WPF "system" colors? 在哪里可以获得WPF“系统”颜色的符号名称? I tried SystemColors but the names do not tell me much, for example I don't see an entry for disabled label text color. 我尝试使用SystemColors但是名称告诉我的内容不多,例如,我看不到禁用标签文本颜色的条目。

And I am looking for something along such lines -- enabled button text color, enabled button background color, disabled button text color, and so on. 我正在寻找类似的东西-启用的按钮文本颜色,启用的按钮背景颜色,禁用的按钮文本颜色,等等。

You can access system colors with x:Static: 您可以使用x:Static访问系统颜色:

<TextBox Text="Looks like disabled text" Foreground="{x:Static SystemColors.GrayTextBrush}"/>

It makes sens also always to take a look to the default styles and templates Control Styles and Templates since a lot of colors are defined there. 由于在其中定义了许多颜色,因此也总是可以查看默认样式和模板, 控件样式和模板

Here are available SystemColors . 这是可用的SystemColors

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM