开发者

WPF CheckBox background color not visible in windows Vista

开发者 https://www.devze.com 2023-01-19 12:47 出处:网络
I have set the background property of a checkbox control to a color, in WPF. It appears OK when run on windows XP but appear as a border color in Vista.开发者_StackOverflow

I have set the background property of a checkbox control to a color, in WPF. It appears OK when run on windows XP but appear as a border color in Vista.开发者_StackOverflow

Anyone know the reason for this behavior and how to overcome?

Thanks.


The default ControlTemplates for the Aero (Vista) and Luna (XP) themes are different and make different use of TemplateBinding to apply externally set properties like Background. To force your brushes to be used differently you'll need to override the default Style and apply your own Template, probably a modified copy of the Aero or Luna version.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号