RadControls for Silverlight

The RadRibbonRadioButton represents an extension of the RadRadioButton. It provides an easier interaction with the RadRibbonBar 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

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:

CopyXAML
<telerik:RadRibbonRadioButton Text="Equation"
                              SmallImage="/Icons/16/Symbol.png"
                              LargeImage="/Icons/32/Symbol.png"
                              Size="Large"
                              IsAutoSize="True"
                              CollapseToSmall="WhenGroupIsMedium"
                              CollapseToMedium="Never" />
Tip
As all buttons in the RadRibbonBar's set slightly expose the same functionality, take a look at the Common functionality section in 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.

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

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

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.

CopyXAML
<telerik:RadRibbonRadioButton Text="Symbol"
                                ...
                              Checked="RadRibbonRadioButton_Checked"
                              Unchecked="RadRibbonRadioButton_Unchecked" />
CopyC#
private void RadRibbonRadioButton_Checked( object sender, RoutedEventArgs e )
{
}
private void RadRibbonRadioButton_Unchecked( object sender, RoutedEventArgs e )
{
}
CopyVB.NET
Private Sub RadRibbonRadioButton_Checked(sender As Object, e As RoutedEventArgs)
End Sub
Private Sub RadRibbonRadioButton_Unchecked(sender As Object, e As RoutedEventArgs)
End Sub
Tip
To learn how to handle ribbon bar button clicks take a look at the Handling the Button Clicks section from the Buttons Overview topic.

Customizing the Ribbon RadioButton

To learn how to change the default appearance of the RibbonRadioButton read this topic.

See Also