79561480

Date: 2025-04-08 07:57:32
Score: 0.5
Natty:
Report link

I’ve created a resource dictionary for the radio button style. You can customize the colors as needed. I hope you find it helpful! The center button in the attached image represents the selected radio button.

enter image description here

Below is the radio button style.

<Style TargetType="RadioButton">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value=" #404040"/>
    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="Height" Value="50"/>
    <Setter Property="Width" Value="50"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="RadioButton">
                <Border x:Name="bd" CornerRadius="25" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Ellipse x:Name="ec"   Width="40"    Height="40"    Fill="#cce0ff"    />
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsChecked" Value="True">
                        <Setter TargetName="ec" Property="Fill" Value="#0047b3"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: S.Nieshant