# Ribbon RadioButton

The **RadRibbonRadioButton** represents an extension of the **RadRadioButton**. It provides an easier interaction with the **RadRibbonView** control. What is special about the **RadRibbonRadioButton** is that it has two states - checked and unchecked. To switch between these states just click on it. Adding several **RadRibbonRadioButtons** to a **RadRibbonGroup** allows you to have only one checked at a time.

> Note that ones the button has been checked, it stays in the checked state unless another radio button in the same **RadRibbonGroup** is clicked. If the button is used alone, it can be unchecked after it has been selected once.

> tip To learn more about the **RadRibbonRadioButton** control read its documentation.

Here is a sample definition of a **RadRibbonRadioButton**:

```XAML
<telerik:RadRibbonRadioButton CollapseToMedium="Never" 
	                              CollapseToSmall="WhenGroupIsMedium"
	                              IsAutoSize="True"
	                              LargeImage="Icons/32/Equation.png"
	                              Size="Large"
	                              SmallImage="Icons/16/Equation.png"
	                              Text="Equation" />
```

> tip As all buttons in the RadRibbonView's set slightly expose the same functionality, take a look at the [Overview](https://www.telerik.com/products/wpf/documentation/controls/radribbonview/features/ribbon-controls/ribbon-buttons/buttons-overview) topic.

This button has its initial size set to **Large** and its text label set to **"Equation"**. As the **IsAutoSize** property is set to **True**, the button will change its size depending on the **RadRibbonGroup's** size. The button will also never collapse to its **Medium** size and will collapse to its **Small** size when the **RadRibbonGroup** collapses to **Medium**.
![WPF RadRibbonView Large Radio Button](https://www.telerik.com/products/wpf/documentation/assets/1918a687ea1dd728c4fa5dc5f76f886a/ribbonview_buttons_radiobutton.png)

Here is an example of a **RadRibbonGroup** that contains two **RadRibbonRadioButtons**.

```XAML
<telerik:RadRibbonGroup DialogLauncherVisibility="Visible" Header="Home Group">
    <telerik:RadRibbonRadioButton CollapseToMedium="Never" 
	                                  CollapseToSmall="WhenGroupIsMedium"
	                                  IsAutoSize="True"
	                                  LargeImage="Icons/32/PageBreak.png"
	                                  Size="Large"
	                                  SmallImage="Icons/16/PageBreak.png"
	                                  Text="Equation" />
    <telerik:RadRibbonRadioButton CollapseToMedium="Never" 
	                                  CollapseToSmall="WhenGroupIsMedium"
	                                  IsAutoSize="True"
	                                  LargeImage="Icons/32/Footer.png"
	                                  Size="Large"
	                                  SmallImage="Icons/16/Footer.png"
	                                  Text="Symbol" />
</telerik:RadRibbonGroup>
```

![WPF RadRibbonView Ribbon Group with Two Radio Buttons](https://www.telerik.com/products/wpf/documentation/assets/0c39b6004c4dddcda65ac5065dd7e638/ribbonview_buttons_radiobuttonsgroup.png)

## Handling Changes in the Button's Checked State

Besides the **Click** event, the **RadRibbonRadioButton** control exposes two additional events - **Checked** and **Unchecked.** They are meant to notify for changes in the checked state of the radio button.

```XAML
<telerik:RadRibbonToggleButton Checked="RadRibbonToggleButton_Checked"
	                               CollapseToMedium="Never"
	                               CollapseToSmall="WhenGroupIsMedium"
	                               IsAutoSize="True"
	                               LargeImage="Icons/32/Equation.png"
	                               Size="Large"
	                               SmallImage="Icons/16/Equation.png"
	                               Text="Symbol"
	                               Unchecked="RadRibbonToggleButton_Unchecked" />
```

```C#
private void RadRibbonToggleButton_Checked(object sender, RoutedEventArgs e)
{
}
private void RadRibbonToggleButton_Unchecked(object sender, RoutedEventArgs e)
{
}
```

```VB.NET
	Private Sub RadRibbonToggleButton_Checked(sender As Object, e As RoutedEventArgs)
	End Sub
	
	Private Sub RadRibbonToggleButton_Unchecked(sender As Object, e As RoutedEventArgs)
	End Sub
```

## See Also

* [Editing Control Templates](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-editing-control-templates)
