How to change the color of inside circle of radio button in WPF XAML

17,580

Solution 1

I'm afraid there is no direct property you can use to change the color.
What you need to do is reTemplate the RadioButton to whatever you would like.

Luckily, the default templates are available, here is the one for the RadioButton.

If I understand correctly what you want to change, you should probably modify the color of the CheckMark (or the entire BulletDecorator depends what you're trying to achieve).

Solution 2

This is an old thread, but in case someone else is looking to change the color of the checked circle inside a radio button, this worked for me without changing the control template:

(1) On the loaded event of the radio button, use a find visual children function (get one here) to locate the ellipse in the visual tree beneath the button.

(2) Change the fill and/or the stroke of the ellipse found in step (1) to the desired color.

(3) That's it!

Solution 3

You have to edit the ControlTemplate of radiobutton. You can use blend and update the control template there.

Share:
17,580

Related videos on Youtube

K T
Author by

K T

Updated on June 04, 2022

Comments

  • K T
    K T almost 2 years

    This is my radio button:

    <RadioButton Content="Add" Grid.Column="1" Height="16" HorizontalAlignment="Left" Margin="50,13,0,0" Name="rdAdd" VerticalAlignment="Top" GroupName="AddEditRadio" Checked ="rdAdd_Checked" FontSize="12.667" />
    

    Now the color of inner circle of radio button is orange.I want to change it to blue.

    Which property do I set to get "Blue" color?

    • MikroDel
      MikroDel over 10 years
      K T - why have you accepted only 4 answers for you 16 questions? And why do you ignore any comments?