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.

To learn more about the RadRibbonRadioButton control read its documentation.

Here is a sample definition of a RadRibbonRadioButton:

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

As all buttons in the RadRibbonView's set slightly expose the same functionality, take a look at the 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. Silverlight RadRibbonView Large Radio Button

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

<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> 

Silverlight RadRibbonView Ribbon Group with Two Radio Buttons

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.

<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" /> 

private void RadRibbonToggleButton_Checked(object sender, RoutedEventArgs e) 
{ 
} 
private void RadRibbonToggleButton_Unchecked(object sender, RoutedEventArgs e) 
{ 
} 
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

In this article