Question

The TaskDialog in Windows7 has a blue Main Instruction text at the top. Is there a way to get that color as a Brush value in WPF?

Was it helpful?

Solution

These colors are actually defined in the Windows User Experience Interaction Guidelines. As far as I know they are not available as named system colors, but the guide explicitly lists the RGB colors and font sizes for the various text elements.

OTHER TIPS

I've written about this here: http://blog.quppa.net/2011/04/30/windows-theme-fonts/

In short, no, there is no support in WPF for retrieving the font size/colour/etc. of theme parts, but there is in Win32 with the GetThemeFont and GetThemeColor functions. These will only work when visual styles are enabled, however, and you will need to hard-code fallback values when Windows Classic or the High-Contrast themes are in use. In the case of 'Main Instruction' text, you should use the caption font (mercifully this is accessible through WPF).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top