How do I retrieve the theme colour of Windows?
I would like to have a way to get the theme colour of the users Windows theme with WPF or C# code-behind. And with this colour I mean the one that can be set in Personalization\Window Color and Appearance under Windows 7(and Vista too, I think). I want to use this colour to make a gradient in much the same way as Trillian 5 does it.
I tried to find it myself, but unfortunately I'm not getting anywhere. Apparently it's not under SystemColors.Whatever
. I ha开发者_如何学运维ve found something on the MSDN but I can't figure out how to use it, nor do I think it's what I want.
If anyone could help me I would be grateful.
I think DwmGetColorizationColor
(http://msdn.microsoft.com/en-us/library/aa969513.aspx) is what you're looking for; you'll need to P/Invoke.
The theme you see on Windows is based on Glass. You have to use a glass in your application to get the same effect.
精彩评论