Symbolic names for WPF system colors?

213 Views Asked by At

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.

1

There are 1 best solutions below

0
Rekshino On

You can access system colors with 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.