Reputation: 25418
How to create custom checkbox that looks like the one shown below. The checkboxes are dynamically drawn and can have custom colors.
Upvotes: 6
Views: 1352
Reputation: 39006
What I would do is, create a custom control called ImageCheckBox which inherits from the default CheckBox class, add in three dependency properties of type ImageSource
, called CheckedImage, IndeterminateImage and UncheckedImage. Just toggle their Visibility
or Opacity
based on the control's CheckStates
, i.e. Checked, Unchecked and Indeterminate.
Upvotes: 0
Reputation: 3107
Well, you can just style it. Take the style from here and change it. The key component in the style is VisualStateManager, make sure you understand what it does.
Also you can create a custom control, you can read about it, for example, here.
Upvotes: 1