Styling the indeterminate state of a WPF checkbox

后端 未结 9 1935
情话喂你
情话喂你 2021-02-04 07:30

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

9条回答
  •  花落未央
    2021-02-04 07:49

    You can use CheckBox styling from the classic theme located at:

    • C:\Program Files (x86)\Microsoft Expression\Blend 4\SystemThemes\Wpf\classic.xaml

    This implementation has a Path representing the checkbox mark called CheckMarkPath. I simply replaced this Path with a filled Rectangle to get these results:

    Checkboxes

提交回复
热议问题