Clearable WPF Radio Buttons

public class RadioButton : System.Windows.Controls.RadioButton
{
    protected override void OnClick()
    {
        bool? wasChecked = IsChecked;
        base.OnClick();
        if (wasChecked.GetValueOrDefault())
        {
            IsChecked = false;
        }
    }
}

Leave a Reply

Your email address will not be published.