Skip to content

How to style a CheckBox #4026

Answered by timunie
timunie asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Mgamerz ,

Almost all ResourceKeys changed in v2.0. Here is an overview about most of the breaking changes: https://mahapps.com/docs/guides/migration-to-v2.0

You have now two options to style the CheckBox

  1. Override the Brushes like <SolidColorBrush x:Key="MahApps.Brushes.CheckBox.ForegroundChecked" Color="White" />
  2. Use the CheckBoxHelper
    <CheckBox Content="Test"
              IsChecked="True"
              mah:CheckBoxHelper.CheckGlyphForegroundChecked="White" />

You may also want to try the new Win10-Style:

<CheckBox Content="Test"
          IsChecked="True"
          Style="{DynamicResource MahApps.Styles.CheckBox.Win10}" />

Happy coding
Tim

P.S.: Next time please do not ask questions in c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by timunie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant