Where can I get symbolic names for WPF "system" colors? I tried SystemColors
but the names do not tell me much, for example I don't see an entry for disabled label text color.
And I am looking for something along such lines -- enabled button text color, enabled button background color, disabled button text color, and so on.
答案 0 :(得分:0)
您可以使用x:Static:
访问系统颜色。<TextBox Text="Looks like disabled text" Foreground="{x:Static SystemColors.GrayTextBrush}"/>
由于默认颜色和模板Control Styles and Templates在其中定义了很多颜色,因此总是要注意一下。
这里有SystemColors。