简体   繁体   English

Wpf 复选框着色

[英]Wpf checkbox colorize

How to colorize system checkbox in WPF?如何在 WPF 中为系统复选框着色? Sample image: Color checkbox示例图像:颜色复选框

I want a simple colorize a background and not effect and restyle checkbox.我想要一个简单的背景着色而不是效果和重新设计复选框。 But set Background="Red" change circle checkbox.但设置Background="Red"更改圆圈复选框。 Ex.: circle bg Thanks.例如:圆 bg谢谢。

you can use the live visual tree tool within a wpf app to find the name/key of the check area.您可以使用 wpf 应用程序中的实时可视化树工具来查找检查区域的名称/键。 You can then create a style based on the default checkbox style with a setter that targets the item and sets it colour.然后,您可以使用针对项目并设置颜色的设置器,基于默认复选框样式创建样式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM