I want to style the indeterminate state of a WPF checkbox. We have a treeview control with checkboxes, and we want the indeterminate state to represent that some descendants are
Call me crazy, but I've actually reimplemented standard Aero checkbox in pure XAML. If you want to customize Aero checkbox, it's a good starting point. You can find other styles in my repository on GitHub (specific commit, in case files are moved).
BulletCommon.xaml (common resources for CheckBox and RadioButton)
CheckBox.xaml (resources for CheckBox)
Notes:
{xx:SystemBrush ControlText}
is a shortcut for {DynamicResource {x:Static SystemColors.ControlTextBrushKey}}
. You can either use that shortcut or just find and replace with regex.
RTL, animations, weird cases are not supported.
This style is slower than using BulletChrome
which is heavily optimized.